1 | <?php |
||
44 | trait EveApiCreatorTrait |
||
45 | { |
||
46 | use CommonFileHandlingTrait, EveApiEventEmitterTrait; |
||
47 | /** |
||
48 | * Getter for $overwrite. |
||
49 | * |
||
50 | * @return boolean |
||
51 | */ |
||
52 | public function isOverwrite(): bool |
||
56 | /** |
||
57 | * @param string $value |
||
58 | * |
||
59 | * @return self Fluent interface. |
||
60 | */ |
||
61 | public function setDir($value) |
||
66 | /** |
||
67 | * Fluent interface setter for $overwrite. |
||
68 | * |
||
69 | * @param bool $value |
||
70 | * |
||
71 | * @return self Fluent interface. |
||
72 | */ |
||
73 | public function setOverwrite(bool $value = true) |
||
78 | /** |
||
79 | * @param Twig_Environment $twig |
||
80 | * |
||
81 | * @return self Fluent interface. |
||
82 | */ |
||
83 | public function setTwig(Twig_Environment $twig) |
||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | protected function getDir(): string |
||
95 | /** |
||
96 | * @param string $for |
||
97 | * @param string $sectionName |
||
98 | * @param string $apiName |
||
99 | * |
||
100 | * @return false|string |
||
101 | * @throws \DomainException |
||
102 | * @throws \InvalidArgumentException |
||
103 | * @throws \LogicException |
||
104 | */ |
||
105 | protected function getTemplateName(string $for, string $sectionName, string $apiName) |
||
120 | /** |
||
121 | * @return Twig_Environment |
||
122 | */ |
||
123 | protected function getTwig(): Twig_Environment |
||
127 | /** |
||
128 | * @var string $dir Directory path used when saving new files. |
||
129 | */ |
||
130 | protected $dir; |
||
131 | /** |
||
132 | * Used to decide if existing file should be overwritten. |
||
133 | * |
||
134 | * @var bool $overwrite |
||
135 | */ |
||
136 | protected $overwrite = false; |
||
137 | /** |
||
138 | * @var Twig_Environment $twig |
||
139 | */ |
||
140 | protected $twig; |
||
141 | } |
||
142 |