/** * Erstellt einen Synchronizer für das $collectionPropertyName in $entityClass * * @return PersistentCollectionSynchronizer */ public static function createFor($entityClass, $collectionPropertyName, DCPackage $dc) { $entityMeta = $dc->getEntityMeta($entityClass); $property = $entityMeta->getPropertyMeta($collectionPropertyName); $collectionClass = $property->getRelationEntityClass(); $synchronizer = new static($entityMeta, $property->getName(), new UniqueEntityHydrator($dc->getEntityManager()->getRepository($collectionClass->getFQN())), new EntityFactory($dc->getEntityMeta($collectionClass->getFQN()))); return $synchronizer; }
protected function createEntityProcessor(Entity $entity) { return new \Psc\Doctrine\Processor($entity, $this->dc->getEntityManager(), $this->dc); }
protected function createImageManager() { return ImageManager::createForProject($this->project, $this->dc->getEntityManager(), $this->getRoleFQN('Image')); }
public function clear() { $this->dc->getEntityManager()->clear(); }
public function __construct($entityName, DCPackage $dc) { $this->em = $dc->getEntityManager(); $this->entityName = $dc->getModule()->getEntityName($entityName); }