public function execute(InputInterface $in, OutputInterface $out) { parent::execute($in, $out); $searchBaseUrl = $this->resolveBaseUrl('search', $in); $user = $this->session->getUser(); $tokenCredentials = NULL !== $user ? $user->getTokenCredentials() : NULL; $service = new Service($searchBaseUrl, $this->session->getConsumerCredentials(), $tokenCredentials); $query = $in->getArgument('query'); $types = $in->getOption('type'); $suggestionsResult = $service->searchSuggestions($query, $types); $suggestions = $suggestionsResult->getSuggestions(); $out->writeln($suggestions); }
/** * @see \CultuurNet\Search\ServiceInterface::getDeletions(). */ public function getDeletions($deleted_since = NULL, $rows = NULL, $start = NULL) { return $this->service->getDeletions($deleted_since, $rows, $start); }