<?php
namespace App\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\DependencyInjection\ContainerInterface as Container;
use App\Services\AnnoncesManager;
class OptimisationImagesCommand extends ContainerAwareCommand
{
private $AnnoncesManager;
private $root;
public function __construct(AnnoncesManager $AnnoncesManager,Container $container)
{
$this->AnnoncesManager = $AnnoncesManager;
$this->root = $container->get('kernel')->getProjectDir();
parent::__construct();
}
protected function configure()
{
$this
->setName('annonce:optiomisationImages')
->setDescription('Optimise les images (créer les small et big)' )
->setHelp('');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->AnnoncesManager->imagesComp();
}
}