本文整理汇总了PHP中Entity::getEntityName方法的典型用法代码示例。如果您正苦于以下问题:PHP Entity::getEntityName方法的具体用法?PHP Entity::getEntityName怎么用?PHP Entity::getEntityName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entity
的用法示例。
在下文中一共展示了Entity::getEntityName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: equals
/**
* @see Psc\Doctrine\Entity
* @inheritdoc
*/
public function equals(Entity $otherEntity = NULL)
{
if ($otherEntity === NULL) {
return FALSE;
}
if ($this->getEntityName() !== $otherEntity->getEntityName()) {
return FALSE;
}
return $this->getIdentifier() === $otherEntity->getIdentifier();
}
示例2: getAllSubclasses
public function getAllSubclasses(Entity $entity)
{
$all_subclasses = array();
$all_entities = array();
$to_traverse = array();
$entityName = $entity->getEntityName();
foreach ($this->entityFactory->listEntities() as $entity_name) {
$all_entities[$entity_name] = $this->entityFactory->getEntity($entity_name);
if (in_array($entityName, $all_entities[$entity_name]->superclasses())) {
$to_traverse[] = $entity_name;
}
}
while (!empty($to_traverse)) {
$this_traverse = array_shift($to_traverse);
$all_subclasses[$this_traverse] = $this_traverse;
foreach ($all_entities as $entity_name => $list_entity) {
if (in_array($this_traverse, $list_entity->superclasses()) && !in_array($entity_name, $all_subclasses)) {
$to_traverse[] = $entity_name;
}
}
}
return array_unique(array_values($all_subclasses));
}
示例3: removeEntity
public function removeEntity(Entity $entity, array $options = array())
{
$entityName = $entity->getEntityName();
return $this->getRepository($entityName)->remove($entity, $options);
}
示例4: removeEntity
public function removeEntity(Entity $entity)
{
$entityName = $entity->getEntityName();
return $this->getRepository($entityName)->remove($entity);
}