1: <?php
2:
3: namespace Mockery\Generator;
4:
5: class MockDefinition
6: {
7: protected $config;
8: protected $code;
9:
10: public function __construct(MockConfiguration $config, $code)
11: {
12: if (!$config->getName()) {
13: throw new \InvalidArgumentException("MockConfiguration must contain a name");
14: }
15: $this->config = $config;
16: $this->code = $code;
17: }
18:
19: public function getConfig()
20: {
21: return $this->config;
22: }
23:
24: public function getClassName()
25: {
26: return $this->config->getName();
27: }
28:
29: public function getCode()
30: {
31: return $this->code;
32: }
33: }
34: