コード例 #1
0
ファイル: Review.php プロジェクト: nickschuch/tl
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // Find any untagged items needing review, use an arbitrarily early date.
     $review = $this->reviewer->getSummary(static::ALL, FALSE, $input->getOption('exact'));
     $table = new Table($output);
     $table->setHeaders(Reviewer::headers($input->getOption('exact')));
     $table->setRows($review);
     $table->render();
 }
コード例 #2
0
ファイル: Send.php プロジェクト: nickschuch/tl
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // Find any untagged items needing review, use an arbitrarily early date.
     $review = $this->reviewer->getSummary(static::ALL, TRUE);
     if (count($review) > 2) {
         // Incomplete records exist.
         $output->writeln('<error>Please tag/comment on the following entries:</error>');
         $table = new Table($output);
         $table->setHeaders(Reviewer::headers());
         $table->setRows($review);
         $table->render();
         return;
     }
     $entry_ids = $return = [];
     foreach ($this->repository->send() as $entry) {
         $entry_ids[$entry->tid] = $this->connector->sendEntry($entry);
         if ($entry_ids[$entry->tid]) {
             // A real entry, give some output.
             $output->writeln(sprintf('Stored entry for <info>%d</info>, remote id <comment>%d</comment>', $entry->tid, $entry_ids[$entry->tid]));
         }
     }
     $this->repository->store($entry_ids);
 }
コード例 #3
0
ファイル: Total.php プロジェクト: nickschuch/tl
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $review = $this->reviewer->getSummary(static::ALL);
     $total = end($review);
     $output->writeln(sprintf('<comment>Total:</comment> %s', $total[2]));
 }