mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-30 13:12:22 +02:00
* correction de la configuration * renommage des services pour preparer SF4 * remplacement des noms de service par les noms de classe * ajout commentaire pour les services n'ayant pas de nom sous forme de nom de classe
33 lines
856 B
PHP
33 lines
856 B
PHP
<?php
|
|
|
|
namespace AppBundle\Command;
|
|
|
|
use AppBundle\Indexation\Meetups\Runner;
|
|
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
class IndexMeetupsCommand extends ContainerAwareCommand
|
|
{
|
|
/**
|
|
* @see Command
|
|
*/
|
|
protected function configure()
|
|
{
|
|
$this
|
|
->setName('indexing:meetups')
|
|
;
|
|
}
|
|
|
|
/**
|
|
* @see Command
|
|
*/
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
$meetupClient = \DMS\Service\Meetup\MeetupKeyAuthClient::factory(['key' => $this->getContainer()->getParameter('meetup_api_key')]);
|
|
|
|
$runner = new Runner($this->getContainer()->get(\AlgoliaSearch\Client::class), $meetupClient);
|
|
$runner->run();
|
|
}
|
|
}
|