I want create ContainerAwareCommand in Symfony2 for print email from my database. I have another class, which consist my data. I only start, but what i my do next?
protected function configure()
{
$this
->setName('demo:email:get')
->setDescription('Print all emails form db');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$service = $this->getContainer()->get('fos_elastica.finder.site.user.email');
$output->writeln('<p>%s</p>', $service);
}
But in my console, my command does not exist