PHP Class Spot\Relation\HasManyThrough

Inheritance: extends RelationAbstract, implements Countable, implements IteratorAggregate, implements ArrayAccess
Afficher le fichier Open project: vlucas/spot2

Protected Properties

Свойство Type Description
$throughCollection

Méthodes publiques

Méthode Description
__construct ( Mapper $mapper, $entityName, $throughEntityName, $foreignKey, $localKey, $identityValue ) Constructor function
count ( ) : integer SPL Countable function Called automatically when attribute is used in a 'count()' function call
eagerLoadOnCollection ( $relationName, Collection $collection ) : Spot\Collection Map relation results to original collection of entities
getIterator ( ) : Collection SPL IteratorAggregate function Called automatically when attribute is used in a 'foreach' loop
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
throughEntityName ( ) Get through entity name

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, $throughEntityName, $foreignKey, $localKey, $identityValue )
$mapper Spot\Mapper

buildQuery() protected méthode

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

count() public méthode

SPL Countable function Called automatically when attribute is used in a 'count()' function call
public count ( ) : integer
Résultat integer

eagerLoadOnCollection() public méthode

Map relation results to original collection of entities
public eagerLoadOnCollection ( $relationName, Collection $collection ) : Spot\Collection
$collection Spot\Entity\Collection
Résultat Spot\Collection

getIterator() public méthode

SPL IteratorAggregate function Called automatically when attribute is used in a 'foreach' loop
public getIterator ( ) : Collection
Résultat Spot\Entity\Collection

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

throughEntityName() public méthode

Get through entity name
public throughEntityName ( )

Property Details

$throughCollection protected_oe property

protected $throughCollection