/** * @inheritdoc */ protected function execute(InputInterface $input, OutputInterface $output) { $lang = $input->getArgument(self::LANGUAGE_ARGUMENT); /** @var Language $language */ if (($language = $this->findLanguage($lang)) === NULL) { $output->writeln("<error>Unknown language {$lang} given!"); return 1; } $output->writeln('<comment>Finding scenarios...</comment>'); $scenarios = $this->scenariosRepository->fetch(new ScreenplayExportQuery($language)); $count = $scenarios->getTotalCount(); $output->writeln("<comment>Found {$count} scenarios</comment>"); $progressBar = new ProgressBar($output); $progressBar->start($count); for ($i = 0; $i <= $count; $i += self::BATCH_SIZE) { $scenarios->applyPaging($i, self::BATCH_SIZE); $scenariosArray = []; /** @var Screenplay $screenplay */ foreach ($scenarios as $screenplay) { $scenariosArray[] = $screenplay; $progressBar->advance(); } $this->screenplayProducer->publish($scenariosArray); } $progressBar->finish(); $output->writeln(""); $output->writeln("<info>Finish</info>"); }
/** * @param QueryObject $listingsQuery * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchListings(QueryObject $listingsQuery) { return $this->listingsRepository->fetch($listingsQuery); }
/** * @param AccessDefinition $query * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchAccessDefinitions(AccessDefinitionQuery $query) { return $this->accessDefinitionRepository->fetch($query); }
/** * @param LogQuery $logQuery * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchLogs(LogQuery $logQuery) { return $this->logRepository->fetch($logQuery); }
public function fetchImages(ImageQuery $imageQuery) { return $this->imageRepository->fetch($imageQuery); }
/** * @param CommentQuery $commentQuery * @return ResultSet */ public function fetchComments(CommentQuery $commentQuery) { return $this->commentsRepository->fetch($commentQuery); }
/** * @param Query $usersQuery * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchUsers(Query $usersQuery) { return $this->usersRepository->fetch($usersQuery); }
/** * @param InvitationsQuery $invitationsQuery * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchInvitations(InvitationsQuery $invitationsQuery) { return $this->invitationsRepository->fetch($invitationsQuery); }
/** * @param PageQuery $query * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchPages(PageQuery $query) { return $this->pageRepository->fetch($query); }
/** * @return \Kdyby\Doctrine\ResultSet */ public function getResultSet() { return $this->repository->fetch($this); }
/** * @param ReceivedMessagesQuery $query * @return array|\Kdyby\Doctrine\ResultSet */ public function fetchMessagesReferences(ReceivedMessagesQuery $query) { return $this->messageReferenceRepository->fetch($query); }
/** * @param TagQuery $tagQuery * @return array|ResultSet */ public function fetchTags(TagQuery $tagQuery) { return $this->tagRepository->fetch($tagQuery); }