public static function construct(\Psc\Doctrine\Entity $entity, \Doctrine\ORM\EntityManager $em) { $ref = new static($entity->getEntityName(), $entity->getIdentifier(), $em); $ref->setEntity($entity); return $ref; }