예제 #1
0
 /**
  *
  * @param FixtureData $data
  * @throws FixtureException
  */
 public function persist(FixtureData $data)
 {
     $object = $data->getObject();
     $class = get_class($object);
     foreach ($this->mapping as $mapping) {
         if (!Matcher::match($class, $mapping['pattern'])) {
             continue;
         }
         return $mapping['persister']->persist($data);
     }
     throw new FixtureException(sprintf('not matching for class "%s"', $class));
 }
예제 #2
0
 /**
  *
  * @param FixtureData $data
  */
 public function persist(FixtureData $data)
 {
     $object = $data->getObject();
     $this->dm->persist($object);
 }
예제 #3
0
 /**
  *
  * @param FixtureData $data
  */
 public function persist(FixtureData $data)
 {
     $this->objects[] = $data->getObject();
 }