1 | <?php |
||
11 | class MakeEntity extends Command |
||
12 | { |
||
13 | /** |
||
14 | * The name and signature of the console command. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $signature = 'make:entity {entity} {--schema=name:string} {--migrate} {--git} {--ide=}'; |
||
19 | |||
20 | /** |
||
21 | * The console command description. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $description = 'Make Entity'; |
||
26 | |||
27 | /** |
||
28 | * Paths to files which should automatically be opened in IDE if the |
||
29 | * option --ide is set (and IDE capable). |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | public $filesToBeOpened = []; |
||
34 | |||
35 | /** |
||
36 | * The name of the entity being created. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | public $entity; |
||
41 | |||
42 | /** |
||
43 | * The Schema object. |
||
44 | * |
||
45 | * @var Schema |
||
46 | */ |
||
47 | public $schema; |
||
48 | |||
49 | /** |
||
50 | * The naming schema object. |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | public $naming = []; |
||
55 | |||
56 | /** |
||
57 | * Execute the console command. |
||
58 | * |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function handle() |
||
69 | |||
70 | private function loadSchema() |
||
77 | |||
78 | private function loadNaming() |
||
95 | |||
96 | private function loadServices() |
||
112 | |||
113 | private function getServicesToBeExecuted(): array |
||
121 | |||
122 | private function executeService(ServiceInterface $service) |
||
126 | |||
127 | /** |
||
128 | * Adds file to $filesToBeOpened stack. |
||
129 | * |
||
130 | * @param $file |
||
131 | * @return void |
||
132 | */ |
||
133 | public function addFile(?\SplFileInfo $file): void |
||
139 | } |
||
140 |