for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GBProd\ElasticsearchDataProviderBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Command to run providing
*
* @author gbprod <[email protected]>
*/
class ProvideCommand extends ContainerAwareCommand
{
* {@inheritdoc}
protected function configure()
$this
->setName('elasticsearch:provide')
->setDescription('Provide data to Elasticsearch')
->addArgument(
'index',
InputArgument::OPTIONAL,
'Index to provide'
)
'type',
null,
'Type to provide'
;
}
protected function execute(InputInterface $input, OutputInterface $output)
$handler = $this->getContainer()
->get('gbprod.elasticsearch_dataprovider.handler')
$handler->handle(
$input->getArgument('index'),
$input->getArgument('type')
);