1 | <?php |
||
16 | class CodeFileGenerator extends CodeGenerator { |
||
17 | |||
18 | /** |
||
19 | * Creates a new CodeFileGenerator |
||
20 | * |
||
21 | * @see https://php-code-generator.readthedocs.org/en/latest/generator.html |
||
22 | * @param CodeFileGeneratorConfig|array $config |
||
23 | */ |
||
24 | 6 | public function __construct($config = null) { |
|
25 | 6 | if (is_array($config)) { |
|
26 | 4 | $this->config = new CodeFileGeneratorConfig($config); |
|
27 | 6 | } else if ($config instanceof CodeFileGeneratorConfig) { |
|
28 | $this->config = $config; |
||
29 | } else { |
||
30 | 2 | $this->config = new CodeFileGeneratorConfig(); |
|
31 | } |
||
32 | |||
33 | 6 | $this->init(); |
|
34 | 6 | } |
|
35 | |||
36 | /** |
||
37 | * {@inheritDoc} |
||
38 | * |
||
39 | * @return CodeFileGeneratorConfig |
||
40 | */ |
||
41 | public function getConfig() { |
||
44 | |||
45 | /** |
||
46 | * {@inheritDoc} |
||
47 | */ |
||
48 | 6 | public function generate(GenerateableInterface $model) { |
|
74 | } |
||
75 |