1 | <?php |
||
17 | class MakeTransformer extends GeneratorCommand |
||
18 | { |
||
19 | /** |
||
20 | * The console command name. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $name = 'make:transformer'; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Create a new transformer class'; |
||
32 | |||
33 | /** |
||
34 | * The type of class being generated. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $type = 'Transformer'; |
||
39 | |||
40 | /** |
||
41 | * Get the stub file for the generator. |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | protected function getStub() |
||
53 | |||
54 | /** |
||
55 | * Get the default namespace for the class. |
||
56 | * |
||
57 | * @param string $rootNamespace |
||
58 | * @return string |
||
59 | */ |
||
60 | protected function getDefaultNamespace($rootNamespace) |
||
64 | |||
65 | /** |
||
66 | * Build the class with the given name. |
||
67 | * |
||
68 | * @param string $name |
||
69 | * @return string |
||
70 | */ |
||
71 | protected function buildClass($name) |
||
85 | |||
86 | /** |
||
87 | * Resolve a model from the given class name. |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | protected function resolveModelFromClassName() |
||
95 | |||
96 | /** |
||
97 | * Build the model replacement values. |
||
98 | * |
||
99 | * @param array $replace |
||
100 | * @return array |
||
101 | */ |
||
102 | protected function buildModelReplacements(array $replace) |
||
116 | |||
117 | /** |
||
118 | * Get the fully-qualified model class name. |
||
119 | * |
||
120 | * @param string $model |
||
121 | * @return string |
||
122 | */ |
||
123 | protected function parseModel($model) |
||
137 | |||
138 | /** |
||
139 | * Get the console command options. |
||
140 | * |
||
141 | * @return array |
||
142 | */ |
||
143 | protected function getOptions() |
||
150 | } |