src/Command/OptimisationImagesCommand.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Command;
  3. use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
  4. use Symfony\Component\Console\Input\InputArgument;
  5. use Symfony\Component\Console\Input\InputInterface;
  6. use Symfony\Component\Console\Input\InputOption;
  7. use Symfony\Component\Console\Output\OutputInterface;
  8. use Symfony\Component\Security\Core\Security;
  9. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  10. use Symfony\Component\HttpFoundation\Request;
  11. use Symfony\Component\DependencyInjection\ContainerInterface as Container;
  12. use App\Services\AnnoncesManager;
  13. class OptimisationImagesCommand extends ContainerAwareCommand
  14. {
  15.     private $AnnoncesManager;
  16.     private $root;
  17.     public function __construct(AnnoncesManager $AnnoncesManager,Container $container)
  18.     {
  19.         $this->AnnoncesManager $AnnoncesManager;
  20.         $this->root $container->get('kernel')->getProjectDir();
  21.         parent::__construct();
  22.     }
  23.     protected function configure()
  24.     {
  25.         $this
  26.             ->setName('annonce:optiomisationImages')
  27.             ->setDescription('Optimise les images (créer les small et big)' )
  28.             ->setHelp('');
  29.     }
  30.     protected function execute(InputInterface $inputOutputInterface $output)
  31.     {
  32.        $this->AnnoncesManager->imagesComp();
  33.     }
  34. }