1 | <?php |
||
15 | abstract class AbstractSchemaCommand extends Command |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * Prefix used by pattern used for replacing data in template files |
||
20 | */ |
||
21 | const PATTERN_PREFIX = '{'; |
||
22 | |||
23 | /** |
||
24 | * Suffix used by pattern used for replacing data in template files |
||
25 | */ |
||
26 | const PATTERN_SUFFIX = '}'; |
||
27 | |||
28 | /** |
||
29 | * File extension used by template files |
||
30 | */ |
||
31 | const TEMPLATE_EXTENSION = 'tpl'; |
||
32 | |||
33 | /** |
||
34 | * Get the value from configuration depending on provided configuration path |
||
35 | * |
||
36 | * @param string $path |
||
37 | * @param null $default |
||
38 | * |
||
39 | * @return null|string |
||
40 | */ |
||
41 | protected function config($path, $default = null) |
||
45 | |||
46 | /** |
||
47 | * Merges provided chunks into path |
||
48 | * |
||
49 | * @param array ...$chunks |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | protected function path(...$chunks) |
||
57 | |||
58 | } |
||
59 |