option('command')), $stub ); $stub = str_replace( 'DummyFullCommand', $this->option('command'), $stub ); return $stub; } /** * Get the stub file for the generator. * * @return string */ protected function getStub() { return __DIR__.'/stubs/command-handler.stub'; } /** * Get the default namespace for the class. * * @param string $rootNamespace * @return string */ protected function getDefaultNamespace($rootNamespace) { return $rootNamespace.'\Handlers\Commands'; } /** * Get the console command options. * * @return array */ protected function getOptions() { return [ ['command', null, InputOption::VALUE_REQUIRED, 'The command class the handler handles.'], ]; } }