/** * * @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)); }
/** * * @param FixtureData $data */ public function persist(FixtureData $data) { $object = $data->getObject(); $this->dm->persist($object); }
/** * * @param FixtureData $data */ public function persist(FixtureData $data) { $this->objects[] = $data->getObject(); }