PHP 클래스 Spot\Relation\BelongsTo

Only used so that the query can be lazy-loaded on demand
상속: extends RelationAbstract, implements ArrayAccess
파일 보기 프로젝트 열기: vlucas/spot2

공개 메소드들

메소드 설명
__construct ( Mapper $mapper, $entityName, $foreignKey, $localKey, $identityValue ) Constructor function
__get ( $key ) ----------------------------------------------
__set ( $key, $val )
entity ( ) Helper function to return the entity
entityKey ( ) : string Get entity key field - for BelongsTo, this will be the local key instead of the primary key.
execute ( ) : Entity Find first entity in the set
identityValuesFromCollection ( Collection $collection ) Set identity values from given collection
offsetExists ( $key ) ----------------------------------------------
offsetGet ( $key )
offsetSet ( $key, $value )
offsetUnset ( $key )
save ( Spot\EntityInterface $entity, string $relationName, array $options = [] ) : boolean Save related entities

보호된 메소드들

메소드 설명
buildQuery ( ) : Query Build query object

메소드 상세

__construct() 공개 메소드

Constructor function
public __construct ( Mapper $mapper, $entityName, $foreignKey, $localKey, $identityValue )
$mapper Spot\Mapper

__get() 공개 메소드

----------------------------------------------
public __get ( $key )

__set() 공개 메소드

public __set ( $key, $val )

buildQuery() 보호된 메소드

Build query object
protected buildQuery ( ) : Query
리턴 Spot\Query

entity() 공개 메소드

Helper function to return the entity
public entity ( )

entityKey() 공개 메소드

Get entity key field - for BelongsTo, this will be the local key instead of the primary key.
public entityKey ( ) : string
리턴 string

execute() 공개 메소드

Find first entity in the set
public execute ( ) : Entity
리턴 Spot\Entity

identityValuesFromCollection() 공개 메소드

Set identity values from given collection
public identityValuesFromCollection ( Collection $collection )
$collection Spot\Entity\Collection

offsetExists() 공개 메소드

----------------------------------------------
public offsetExists ( $key )

offsetGet() 공개 메소드

public offsetGet ( $key )

offsetSet() 공개 메소드

public offsetSet ( $key, $value )

offsetUnset() 공개 메소드

public offsetUnset ( $key )

save() 공개 메소드

Save related entities
public save ( Spot\EntityInterface $entity, string $relationName, array $options = [] ) : boolean
$entity Spot\EntityInterface Entity to save relation from
$relationName string Name of the relation to save
$options array Options to pass to the mappers
리턴 boolean