Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $io = new SymfonyStyle($input, $output);
     $io->getFormatter()->setStyle('red', new OutputFormatterStyle('red', 'default'));
     $header = ['Show', 'Episode Title', 'Season/Episode', 'Date', 'Link'];
     $this->displayAsTable($io, $header, $this->getUpcomingEpisodes());
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $io = new SymfonyStyle($input, $output);
     $io->getFormatter()->setStyle('red', new OutputFormatterStyle('red', 'default'));
     $start = new \DateTimeImmutable('last sunday');
     $end = new \DateTimeImmutable('this sunday');
     $io->title(sprintf('Showing episodes from %s to %s', $start->format('d/m/Y'), $end->format('d/m/Y')));
     $sorted_results = $this->getEpisodesForWeek($start, $end);
     $header = ['Show', 'Episode Title', 'Season/Episode', 'Date', 'Time', 'Link'];
     $this->displayAsTable($io, $header, $sorted_results);
 }