| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class CriteriaGenerator extends Generator |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Get stub name. |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $stub = 'criteria/criteria'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get root namespace. |
||
| 21 | * |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | public function getRootNamespace() |
||
| 25 | { |
||
| 26 | return parent::getRootNamespace() . parent::getConfigGeneratorClassPath($this->getPathConfigNode()); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get generator path config node. |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | public function getPathConfigNode() |
||
| 34 | { |
||
| 35 | return 'criteria'; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Get destination path for generated file. |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function getPath() |
||
| 44 | { |
||
| 45 | return $this->getBasePath() . '/' . parent::getConfigGeneratorClassPath($this->getPathConfigNode(), true) . '/' . $this->getName() . 'Criteria.php'; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get base path of destination file. |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getBasePath() |
||
| 56 | } |
||
| 57 | } |
||
| 58 |