1 | <?php |
||
11 | class ListenerMakeCommand extends BaseCommand |
||
12 | { |
||
13 | use GeneratorCommandTrait; |
||
14 | |||
15 | /** |
||
16 | * The console command singature. |
||
17 | * |
||
18 | * @var stringphp |
||
19 | */ |
||
20 | protected $signature = 'make:listener |
||
21 | {name : The name of the class} |
||
22 | {--a|addon= : The name of the addon} |
||
23 | {--e|event= : The event class the being listened for} |
||
24 | {--queued : Indicates the event listener should be queued} |
||
25 | '; |
||
26 | |||
27 | /** |
||
28 | * The console command description. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $description = '[+] Create a new event listener class'; |
||
33 | |||
34 | /** |
||
35 | * The type of class being generated. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $type = 'Listener'; |
||
40 | |||
41 | /** |
||
42 | * The constructor. |
||
43 | */ |
||
44 | 8 | public function __construct() |
|
50 | |||
51 | /** |
||
52 | * Process command line arguments |
||
53 | * |
||
54 | * @return bool |
||
55 | */ |
||
56 | 6 | protected function processArguments() |
|
64 | |||
65 | /** |
||
66 | * Get the default namespace for the class. |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | 4 | protected function getDefaultNamespace() |
|
74 | |||
75 | /** |
||
76 | * Get the stub file for the generator. |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | 4 | protected function getStub() |
|
84 | |||
85 | /** |
||
86 | * Generate file. |
||
87 | * |
||
88 | * @param \Jumilla\Generators\FileGenerator $generator |
||
89 | * @param string $path |
||
90 | * @param string $fqcn |
||
91 | * |
||
92 | * @return bool |
||
93 | */ |
||
94 | 4 | protected function generateFile(FileGenerator $generator, $path, $fqcn) |
|
105 | } |
||
106 |