예제 #1
0
 public function __invoke($id, OutputInterface $output)
 {
     $article = $this->repository->getArticle($id);
     $output->writeln('<info>' . $article->getTitle() . '</info>');
     $output->writeln($article->getContent());
 }
예제 #2
0
 public function show($id)
 {
     $article = $this->repository->getArticle($id);
     echo $this->twig->render('article.twig', ['article' => $article]);
 }