2020/04/04 | フレームワーク
2020/04/03 | フレームワーク
Symfony\Component\Console\Command\Command::run() から Illuminate/Console/Command::execute() がコールされました。見てみましょう。 Illuminate/Console/Command::execute() /** * Execute the console command. * * @param \Symfony\Component\Console\Input\InputInterface $input * @param...
2020/04/02 | フレームワーク
Symfony\Component\Console\Application::find() メソッドからコマンド名が返ってきました。 TRY でコールしていましたので、例外が出た場合のロジックも書いてあります。 「定義されていません」「もしかしてこれのこと?」のような感じのメッセージをセットしています。 ざっと斜めよみしたら次に行きましょう。 $this->runningCommand に実行コマンドを代入しています。状態管理でしょうか。 次に doRunCommand() がコールされています。 $exitCode =...
2020/04/02 | フレームワーク
Console\Application::doRun() の処理の流れで find() メソッドがコールされているところまで読みました。では、find() を見てみましょう。 Symfony\Component\Console\Application::find() | 関連メソッド /** * Finds a command by name or alias. * * Contrary to get, this command tries to find the best * match if you give it an...
2020/04/01 | フレームワーク
いよいよ run() の実行です。 実際にコールされるのは Illuminate\Console\Application::run() です。 さっそく見てみましょう。 Illuminate\Console\Application::run() /** * {@inheritdoc} */ public function run(InputInterface $input = null, OutputInterface $output = null) { $commandName = $this->getCommandName(...