src/Hitso/Bundle/CommonBundle/Doctrine/DataFixtures/AbstractFixture.php line 45

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Hitso\Bundle\CommonBundle\Doctrine\DataFixtures;
  4. use Doctrine\Common\DataFixtures\AbstractFixture as BaseAbstractFixture;
  5. use Doctrine\Persistence\ObjectManager;
  6. use Symfony\Component\Console\Command\Command;
  7. use Symfony\Component\Console\ConsoleEvents;
  8. use Symfony\Component\Console\Event\ConsoleCommandEvent;
  9. use Symfony\Component\Console\Output\OutputInterface;
  10. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  11. /**
  12.  * Class AbstractFixture
  13.  *
  14.  * @package Hitso\Bundle\CommonBundle\Doctrine\DataFixtures
  15.  */
  16. class AbstractFixture extends BaseAbstractFixture implements EventSubscriberInterface
  17. {
  18.     /**
  19.      * @var OutputInterface
  20.      */
  21.     protected $output;
  22.     /**
  23.      * @var Command
  24.      */
  25.     protected $command;
  26.     /**
  27.      * @return array|string[]
  28.      */
  29.     public static function getSubscribedEvents()
  30.     {
  31.         return [
  32.             ConsoleEvents::COMMAND => 'init',
  33.         ];
  34.     }
  35.     /**
  36.      * @param ConsoleCommandEvent $event
  37.      */
  38.     public function init(ConsoleCommandEvent $event): void
  39.     {
  40.         $this->output $event->getOutput();
  41.         $this->command $event->getCommand();
  42.     }
  43.     /**
  44.      * @param ObjectManager $manager
  45.      */
  46.     public function load(ObjectManager $manager): void
  47.     {
  48.     }
  49. }