getSource() 공개 메소드

Get source class name
public getSource ( ) : string
리턴 string
예제 #1
0
 /**
  * Delete all references created by this relationship
  *
  * @param Relationship    $relationship Forward relationship
  * @param object|object[] $value        Forward relationship value
  * @param string          $local_id     ID of local entity
  * @internal param string $key Forward relationship key
  */
 private function deleteRelationshipRefs(Relationship $relationship, $value, $local_id)
 {
     $ref = new Ref($relationship->getSource(), $local_id, $relationship->getName());
     if (!is_array($value)) {
         $value = [$value];
     }
     foreach ($value as $foreign_entity) {
         if (null !== $foreign_entity) {
             $foreign_id = $this->getEntityId($foreign_entity);
             $ref_key = $this->getKeyScheme()->getEntityRefKey($this->getTargetTable($relationship), $foreign_id);
             $this->getDriver()->removeRef($ref_key, $ref);
         }
     }
 }
예제 #2
0
 /**
  * Get the relationship source table name
  *
  * @param Relationship $relationship
  * @return string
  */
 protected function getSourceTable(Relationship $relationship)
 {
     return $this->getTableForClass($relationship->getSource());
 }