Total Complexity | 8 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 95% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | trait HasItemsDirectoryTrait |
||
10 | { |
||
11 | protected $itemsDirectory = null; |
||
12 | |||
13 | |||
14 | /** |
||
15 | * @return null|string |
||
16 | */ |
||
17 | 14 | public function getItemsDirectory() |
|
18 | { |
||
19 | 14 | if ($this->itemsDirectory == null) { |
|
20 | 13 | $this->initItemsDirectory(); |
|
21 | } |
||
22 | |||
23 | 14 | return $this->itemsDirectory; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param $dir |
||
28 | */ |
||
29 | 14 | public function setItemsDirectory($dir) |
|
30 | { |
||
31 | 14 | $this->itemsDirectory = $dir; |
|
32 | 14 | } |
|
33 | |||
34 | 13 | protected function initItemsDirectory() |
|
37 | 13 | } |
|
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | 13 | public function generateItemsDirectory() |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 13 | protected function generateManagerDirectory() |
|
56 | { |
||
57 | 13 | $reflector = new \ReflectionObject($this->getManager()); |
|
58 | |||
59 | 13 | return dirname($reflector->getFileName()); |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | 13 | protected function generatePropertyDirectory() |
|
68 | } |
||
69 | } |