![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/demo.cartinsight.co/vendor/orchestra/workbench/src/Recipes/ |
<?php namespace Orchestra\Workbench\Recipes; use Illuminate\Contracts\Console\Kernel as ConsoleKernel; use Orchestra\Workbench\Contracts\Recipe; use Symfony\Component\Console\Output\OutputInterface; class Command implements Recipe { /** * After completion callback. * * @var (callable(\Symfony\Component\Console\Output\OutputInterface):(void))|null */ public $callback; /** * Construct a new recipe. * * @param array<string, mixed> $options * @param (callable(\Symfony\Component\Console\Output\OutputInterface):(void))|null $callback */ public function __construct( public string $command, public array $options = [], ?callable $callback = null ) { $this->callback = $callback; } /** * Run the recipe. * * @return void */ public function handle(ConsoleKernel $kernel, OutputInterface $output) { $kernel->call( $this->commandName(), $this->commandOptions(), $output ); if (\is_callable($this->callback)) { \call_user_func($this->callback, $output); } } /** * Get the command name. */ protected function commandName(): string { return $this->command; } /** * Get the command options. * * @return array<string, mixed> */ protected function commandOptions(): array { return $this->options; } }