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 | 言語
PHP 5.5 以降では、文字列リテラル内の文字に対して [] や {} でアクセスできるそうです。 例 $xion = ‘xionxionxion’; echo($xion[0].PHP_EOL); echo($xion[1].PHP_EOL); echo($xion[2].PHP_EOL); echo($xion[3].PHP_EOL); 出力結果 x i o n TAGS:...