name ) { $this->signature = $this->name.' {module}'; } } /** * @param InputInterface $input * @param OutputInterface $output * @return void */ protected function initialize(InputInterface $input, OutputInterface $output): void { if ($input->hasArgument('module') && ! Module::getEnabled()->pluck('name')->merge(Collection::make(config('catch.module.default')))->contains(lcfirst($input->getArgument('module'))) ) { $this->error(sprintf('Module [%s] Not Found', $input->getArgument('module'))); exit; } } /** * * @param string $question * @param null $default * @param bool $isChoice * @return string|int|null */ public function askFor(string $question, $default = null, bool $isChoice = false): string|null|int { $_default = $default ? "[$default]" : ''; $choice = $isChoice ? 'YesORNo' : ''; $answer = ask( <<
CatchAdmin
$question $_default $choice : HTML ); $this->newLine(); if ($default && ! $answer) { return $default; } return $answer; } /** * info * * @param $string * @param null $verbosity * @return void */ public function info($string, $verbosity = null): void { render( <<
CatchAdmin
$string HTML ); } /** * error * * @param $string * @param null $verbosity * @return void */ public function error($string, $verbosity = null): void { render( <<
CatchAdmin
$string HTML ); } }