カスタムコマンドを作成しました:
class CrawlCommand extends ContainerAwareCommand{
protected function configure(){
$this->setName('crawler:crawl')
->setDescription('Command for crawling content');
}
protected function execute(InputInterface $input, OutputInterface $output){
$msg = 'hello';
$output->writeln($msg);
}
}
教えてください、実行関数でアクションを実行するにはどうすればよいですか?アクション呼び出しCrawlerBundle:Index:index
。サービスがなければ、ブラウザのようなアクションを実行するだけです。