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