/** * @see Symfony\Component\Console\Command\Command::execute() */ protected function execute(InputInterface $input, OutputInterface $output) { $index = $input->getOption('index'); $reset = $input->getOption('no-reset') ? false : true; if (null !== $index) { $this->populateIndex($output, $index, $reset); } else { $indexes = array_keys($this->indexManager->getIndexes()); foreach ($indexes as $index) { $this->populateIndex($output, $index, $reset); } } }
public function buildClient(Client $client) { $output = ''; foreach ($this->indexes->getIndexes() as $index) { if ($index->getClient()->getId() === $client->getId()) { $output .= $this->buildIndex($index); } } $output .= "searchd {\r\n"; foreach ($client->getConfig() as $key => $val) { $output .= "\t{$key} = {$val}\r\n"; } $output .= "}\r\n"; return $output; }