1 | <?php |
||
8 | class TransformerMakeCommand extends GeneratorCommand |
||
9 | { |
||
10 | /** |
||
11 | * The name and signature of the console command. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $signature = 'make:transformer |
||
16 | {name : The name of the class} |
||
17 | {include? : Name of the class to include.}'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Create a new Transformer Class'; |
||
25 | |||
26 | /** |
||
27 | * The type of class being generated. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $type = 'Transformer'; |
||
32 | |||
33 | /** |
||
34 | * Replace the class name for the given stub. |
||
35 | * |
||
36 | * @param string $stub Contents of the stub |
||
37 | * @param string $name The class name |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | protected function replaceClass($stub, $name) |
||
54 | |||
55 | /** |
||
56 | * Get the stub file for the generator. |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | protected function getStub() |
||
66 | |||
67 | /** |
||
68 | * Get the default namespace for the class. |
||
69 | * |
||
70 | * @param string $rootNamespace The root namespace |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | protected function getDefaultNamespace($rootNamespace) |
||
78 | |||
79 | /** |
||
80 | * Get the destination class path. |
||
81 | * |
||
82 | * @param string $name Name of the class with namespace |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | protected function getPath($name) |
||
92 | } |
||
93 |