1 | <?php |
||
8 | class MakePlaybookCommand extends GeneratorCommand |
||
9 | { |
||
10 | /** |
||
11 | * The name and signature of the console command. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $signature = 'make:playbook |
||
16 | {name : The name of the playbook}'; |
||
17 | |||
18 | /** |
||
19 | * The console command description. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $description = 'Create a new playbook.'; |
||
24 | |||
25 | /** |
||
26 | * The type of class being generated. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $type = 'Playbook'; |
||
31 | |||
32 | /** |
||
33 | * Replace the class name for the given stub. |
||
34 | * |
||
35 | * @param string $stub |
||
36 | * @param string $name |
||
37 | * @return string |
||
38 | */ |
||
39 | protected function replaceClass($stub, $name) |
||
43 | |||
44 | /** |
||
45 | * Get the stub file for the playbook. |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | protected function getStub() |
||
53 | |||
54 | /** |
||
55 | * Get the destination class path. |
||
56 | * |
||
57 | * @param string $name |
||
58 | * @return string |
||
59 | */ |
||
60 | protected function getPath($name) |
||
64 | |||
65 | /** |
||
66 | * Get the full namespace for a given class, without the class name. |
||
67 | * |
||
68 | * @param string $name |
||
69 | * @return string |
||
70 | */ |
||
71 | protected function getNamespace($name) |
||
75 | |||
76 | /** |
||
77 | * Get the desired class name from the input. |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | protected function getNameInput() |
||
85 | |||
86 | /** |
||
87 | * Parse the class name and format according to the root namespace. |
||
88 | * |
||
89 | * @param string $name |
||
90 | * @return string |
||
91 | */ |
||
92 | protected function qualifyClass($name) |
||
96 | } |
||
97 |