PHP Класс Spot\Relation\HasMany

Наследование: extends RelationAbstract, implements Countable, implements IteratorAggregate, implements ArrayAccess
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Mapper $mapper, $entityName, $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

Защищенные методы

Метод Описание
buildQuery ( ) : Query Build query object

Описание методов

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

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

buildQuery() защищенный Метод

Build query object
protected buildQuery ( ) : Query
Результат Spot\Query

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

SPL Countable function Called automatically when attribute is used in a 'count()' function call
public count ( ) : integer
Результат integer

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

Map relation results to original collection of entities
public eagerLoadOnCollection ( $relationName, Collection $collection ) : Spot\Collection
$collection Spot\Entity\Collection
Результат Spot\Collection

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

SPL IteratorAggregate function Called automatically when attribute is used in a 'foreach' loop
public getIterator ( ) : Collection
Результат Spot\Entity\Collection

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