1 | <?php |
||
21 | class Base extends Controller |
||
22 | { |
||
23 | const SINGLE_FILE = 'single'; |
||
24 | const MULTIPLE_FILES = 'multiple'; |
||
25 | |||
26 | public $file = 'config/schema.yml'; |
||
27 | public $path = 'config/schema/'; |
||
28 | public $overrideFile = 'config/override.yml'; |
||
29 | public $configFile = 'config/schematic.yml'; |
||
30 | public $exclude; |
||
31 | public $include; |
||
32 | /** @var string */ |
||
33 | private $storageType; |
||
34 | /** @var array */ |
||
35 | private $config; |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function options($actionID): array |
||
46 | |||
47 | /** |
||
48 | * Get the datatypes to import and/or export. |
||
49 | * |
||
50 | * @return array |
||
51 | */ |
||
52 | protected function getDataTypes(): array |
||
74 | |||
75 | /** |
||
76 | * Apply given includes. |
||
77 | * |
||
78 | * @param array $dataTypes |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | protected function applyIncludes($dataTypes): array |
||
98 | |||
99 | /** |
||
100 | * Apply given excludes. |
||
101 | * |
||
102 | * @param array $dataTypes |
||
103 | * |
||
104 | * @return array |
||
105 | */ |
||
106 | protected function applyExcludes(array $dataTypes): array |
||
122 | |||
123 | /** |
||
124 | * Disable normal logging (to stdout) while running console commands. |
||
125 | * |
||
126 | * @TODO: Find a less hacky way to solve this |
||
127 | */ |
||
128 | protected function disableLogging() |
||
134 | |||
135 | /** |
||
136 | * Convert a filename to one safe to use. |
||
137 | * |
||
138 | * @param $fileName |
||
139 | * @return mixed |
||
140 | */ |
||
141 | protected function toSafeFileName($fileName) { |
||
148 | |||
149 | /** |
||
150 | * Convert a safe filename back to it's original form. |
||
151 | * |
||
152 | * @param $fileName |
||
153 | * @return mixed |
||
154 | */ |
||
155 | protected function fromSafeFileName($fileName) { |
||
162 | |||
163 | /** |
||
164 | * Get the storage type. |
||
165 | * |
||
166 | * @throws \Exception |
||
167 | */ |
||
168 | protected function getStorageType() : string |
||
172 | |||
173 | /** |
||
174 | * Get a setting from the config. |
||
175 | * |
||
176 | * @param $name |
||
177 | * |
||
178 | * @return mixed|null |
||
179 | * @throws \Exception |
||
180 | */ |
||
181 | public function getConfigSetting($name) |
||
186 | |||
187 | /** |
||
188 | * @return array |
||
189 | * @throws \Exception |
||
190 | */ |
||
191 | public function getConfig(): array |
||
198 | |||
199 | /** |
||
200 | * @param array $config |
||
201 | */ |
||
202 | public function setConfig(array $config): void |
||
206 | |||
207 | /** |
||
208 | * @throws \Exception |
||
209 | */ |
||
210 | protected function readConfigFile() |
||
218 | } |
||
219 |