PHP Class Spot\Relation\HasOne

Inheritance: extends RelationAbstract
Afficher le fichier Open project: vlucas/spot2

Méthodes publiques

Méthode Description
__construct ( Mapper $mapper, $entityName, $foreignKey, $localKey, $identityValue ) Constructor function
__get ( $key ) ----------------------------------------------
__set ( $key, $val )
entity ( ) Helper function to return the entity
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

Méthodes protégées

Méthode Description
buildQuery ( ) : Query Build query object

Method Details

__construct() public méthode

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

__get() public méthode

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

__set() public méthode

public __set ( $key, $val )

buildQuery() protected méthode

Build query object
protected buildQuery ( ) : Query
Résultat Spot\Query

entity() public méthode

Helper function to return the entity
public entity ( )

execute() public méthode

Find first entity in the set
public execute ( ) : Entity
Résultat Spot\Entity

identityValuesFromCollection() public méthode

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

offsetExists() public méthode

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

offsetGet() public méthode

public offsetGet ( $key )

offsetSet() public méthode

public offsetSet ( $key, $value )

offsetUnset() public méthode

public offsetUnset ( $key )

save() public méthode

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
Résultat boolean