Created
March 27, 2017 11:48
-
-
Save Ludovicmoreau/3343845d5d8a9fa06aa02b4f1da90a9a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Infrastructure\Bundle\InfrastructureBundle\DataFixtures\ORM; | |
use Doctrine\Common\DataFixtures\AbstractFixture; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Nelmio\Alice\Fixtures; | |
class FixturesLoader extends AbstractFixture implements ContainerAwareInterface | |
{ | |
/** | |
* @var ContainerInterface | |
*/ | |
private $container; | |
/** | |
* @inheritDoc | |
*/ | |
public function setContainer(ContainerInterface $container = null) | |
{ | |
$this->container = $container; | |
} | |
/** | |
* @inheritDoc | |
*/ | |
public function load(ObjectManager $manager) | |
{ | |
$files = [ | |
__DIR__ . '/User.yml', | |
]; | |
Fixtures::load($files, $manager); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment