output->writeln("[".$type."]".$msg); } /** * 命令行核心方法,不要重写 * @param Input $input * @param Output $output * @return int|void|null */ protected function execute(Input $input, Output $output) { $this->input=$input; $this->output=$output; $this->main(); } /** * 命令行主程序,继承后重写此方法,将业务写在此方法中 */ protected function main(){ } }