1 | <?php |
||
10 | class MakeControllerCommand extends Command |
||
11 | { |
||
12 | /** |
||
13 | * The console command name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name = 'make:module:controller'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Create a new module controller file'; |
||
25 | |||
26 | /** |
||
27 | * Array to store the configuration details. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $container; |
||
32 | |||
33 | /** |
||
34 | * Create a new command instance. |
||
35 | * |
||
36 | * @param Filesystem $files |
||
37 | * @param Modules $module |
||
38 | */ |
||
39 | public function __construct(Filesystem $files, Modules $module) |
||
46 | |||
47 | /** |
||
48 | * Execute the console command. |
||
49 | * |
||
50 | * @return mixed |
||
51 | */ |
||
52 | public function fire() |
||
67 | |||
68 | /** |
||
69 | * Create a new migration file. |
||
70 | * |
||
71 | * @return int |
||
72 | */ |
||
73 | protected function makeFile() |
||
77 | |||
78 | /** |
||
79 | * Get file destination. |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | protected function getDestinationFile() |
||
87 | |||
88 | /** |
||
89 | * Get module migration path. |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | protected function getPath() |
||
99 | |||
100 | /** |
||
101 | * Get the migration filename. |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | protected function getFilename() |
||
109 | |||
110 | /** |
||
111 | * Get the stub content. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | protected function getStubContent() |
||
119 | |||
120 | /** |
||
121 | * Replace placeholder text with correct values. |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | protected function formatContent($content) |
||
133 | |||
134 | /** |
||
135 | * Get the console command arguments. |
||
136 | * |
||
137 | * @return array |
||
138 | */ |
||
139 | protected function getArguments() |
||
146 | } |
||
147 |