private function loadFixtures()
    {
        $em = $this->entityManager;

        $this->dispatchEvent($em, 'preTruncate');

        $purger = new ORMPurger($em);
        $purger->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE);

        $executor = new ORMExecutor($em, $purger);
        $executor->setReferenceRepository($this->getReferenceRepository());

        if ( ! $this->useBackup) {
            $executor->purge();
        }

        $this->runMigrations();

        $executor->execute($this->fixtures, true);

        $this->dispatchEvent($em, 'postTruncate');
    }
private function loadFixtures()
    {
        $em = $this->entityManager;

        $this->dispatchEvent($em, 'preTruncate');

        $purger = new ORMPurger($em);
        $purger->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE);

        $executor = new ORMExecutor($em, $purger);
        $executor->setReferenceRepository($this->getReferenceRepository());

        if ( ! $this->useBackup) {
            $executor->purge();
        }

        $this->runMigrations();

        $executor->execute($this->fixtures, true);

        $this->dispatchEvent($em, 'postTruncate');
    }
private function loadFixtures ( ) { $ em = $ this -> entityManager ; $ this -> dispatchEvent ( $ em , 'preTruncate' ) ; $ purger = new ORMPurger ( $ em ) ; $ purger -> setPurgeMode ( ORMPurger :: PURGE_MODE_TRUNCATE ) ; $ executor = new ORMExecutor ( $ em , $ purger ) ; $ executor -> setReferenceRepository ( $ this -> getReferenceRepository ( ) ) ; if ( ! $ this -> useBackup ) { $ executor -> purge ( ) ; } $ this -> runMigrations ( ) ; $ executor -> execute ( $ this -> fixtures , true ) ; $ this -> dispatchEvent ( $ em , 'postTruncate' ) ; }
Load fixtures into database
Load fixtures into database