Exemplo n.º 1
0
 /**
  * Load a data fixture class.
  *
  * @param DataFixturesLoader $loader
  * @param string             $className
  */
 private function loadFixtureClass(DataFixturesLoader $loader, $className)
 {
     $fixture = new $className();
     if ($loader->hasFixture($fixture)) {
         unset($fixture);
         return;
     }
     $loader->addFixture($fixture);
     if ($fixture instanceof DependentFixtureInterface) {
         foreach ($fixture->getDependencies() as $dependency) {
             $this->loadFixtureClass($loader, $dependency);
         }
     }
 }