@@ 202-210 (lines=9) @@ | ||
199 | $this->info('Generate', ['class' => $this->currentClass->getName(), 'namespace' => $phpNamespace->getName(), 'comment' => $this->currentClass->getComment(), 'properties' => $properties]); |
|
200 | ||
201 | // extend class |
|
202 | if (array_key_exists('extend', $properties)) { |
|
203 | $extendClassName = $properties['extend']; |
|
204 | $this->info('Aggiungo extend', [ |
|
205 | 'class' => $this->currentClass->getName(), |
|
206 | 'extend' => $extendClassName, |
|
207 | ]); |
|
208 | $this->currentClass->setExtends($extendClassName); |
|
209 | $this->currentClass->getNamespace()->addUse($extendClassName); |
|
210 | } |
|
211 | ||
212 | // implements class |
|
213 | if (array_key_exists('implements', $properties)) { |
|
@@ 383-390 (lines=8) @@ | ||
380 | } |
|
381 | } |
|
382 | ||
383 | if (array_key_exists($fieldClassName, $typesReference)) { |
|
384 | $this->info('Add field type class with namespace', [ |
|
385 | 'class' => $this->currentClass->getName(), |
|
386 | 'field' => $fieldClassName, |
|
387 | 'className' => $fieldClassFull, |
|
388 | ]); |
|
389 | $this->currentClass->getNamespace()->addUse($fieldClassFull); |
|
390 | } |
|
391 | } else { |
|
392 | //tipo primitivo |
|
393 | $fieldClassName = $fieldProperties['primitive']; |