Skip to content

Instantly share code, notes, and snippets.

@Ludovicmoreau
Created March 27, 2017 11:48
Show Gist options
  • Save Ludovicmoreau/3343845d5d8a9fa06aa02b4f1da90a9a to your computer and use it in GitHub Desktop.
Save Ludovicmoreau/3343845d5d8a9fa06aa02b4f1da90a9a to your computer and use it in GitHub Desktop.
<?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