getName() публичный Метод

Get Name
public getName ( ) : string
Результат string
Пример #1
0
 /**
  * Hydrate a relationship
  *
  * @param Relationship $relative
  * @return $this
  */
 public function hydrateRelative(Relationship $relative)
 {
     $this->entity_manager->getDriver()->debugLog("Hydrating relative for " . $this->metadata->getTableName() . "[" . $this->getReader()->getId() . "]::" . $relative->getName());
     $setter = $relative->getSetter();
     $key = $this->entity_manager->getKeyScheme()->getRelationshipKey($relative, $this->entity_manager->getMapper()->getEntityMetadata($relative->getSource())->getTableName(), $this->entity_manager->getMapper()->getEntityMetadata($relative->getTarget())->getTableName(), $this->getReader()->getId());
     if (RelationshipType::isMultiIndex($relative->getRelationshipType())) {
         $items = [];
         $ids = $this->entity_manager->getDriver()->getMultiValueIndex($key);
         foreach ($ids as $id) {
             $items[] = $this->entity_manager->retrieveEntityOrNew($relative->getTarget(), $id);
         }
         $this->proxy->{$setter}($items);
     } else {
         $id = $this->entity_manager->getDriver()->getSingleValueIndex($key);
         if ($id) {
             $this->proxy->{$setter}($this->entity_manager->retrieve($relative->getTarget(), $id));
         }
     }
     return $this;
 }
Пример #2
0
 /**
  * Returns the inverse equivalent of a given relationship
  *
  * @param Relationship $relationship
  * @return Relationship
  */
 public function invertRelationship(Relationship $relationship)
 {
     if (!$relationship->getInversedBy()) {
         throw new InvalidArgumentException('Relationship "' . $relationship->getName() . '" is not inversed');
     }
     $metadata = $this->getMapper()->getEntityMetadata($relationship->getTarget());
     $inverse = $metadata->getRelationshipByName($relationship->getInversedBy());
     if (!$inverse) {
         throw new InvalidEntityException('Relationship "' . $relationship->getName() . '" inverse side "' . $relationship->getInversedBy() . '" cannot be not found');
     }
     return $inverse;
 }
Пример #3
0
 /**
  * Get the key for a sort index on a relationship
  *
  * @param Relationship $relationship Relationship
  * @param string       $sort_field   Property name on the inverse entity
  * @param string       $id           Local ID
  * @return string
  */
 public function getSortIndexKey(Relationship $relationship, $sort_field, $id)
 {
     // srt:category-article:89726:title
     return static::SORT_NAMESPACE . $this->delimiter . $relationship->getSourceTable() . '-' . $relationship->getTargetTable() . $this->delimiter . $id . $this->delimiter . $relationship->getName() . $this->delimiter . $sort_field;
 }