예제 #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]));
 }