PHP Class Nextras\Orm\Mapper\Dbal\RelationshipMapperOneHasMany

Inheritance: extends Nette\Object, implements Nextras\Orm\Mapper\IRelationshipMapper
Show file Open project: nextras/orm Class Usage Examples

Protected Properties

Property Type Description
$cacheCounts int[]
$cacheEntityIterator Nextras\Orm\Collection\IEntityIterator[]
$connection Nextras\Dbal\Connection
$joinStorageKey string
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$targetMapper DbalMapper
$targetRepository Nextras\Orm\Repository\IRepository

Public Methods

Method Description
__construct ( Nextras\Dbal\Connection $connection, DbalMapper $targetMapper, PropertyMetadata $metadata )
getIterator ( Nextras\Orm\Entity\IEntity $parent, Nextras\Orm\Collection\ICollection $collection ) ==== ITERATOR ===================================================================================================
getIteratorCount ( Nextras\Orm\Entity\IEntity $parent, Nextras\Orm\Collection\ICollection $collection ) ==== ITERATOR COUNT =============================================================================================

Protected Methods

Method Description
calculateCacheKey ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, array $values )
execute ( DbalCollection $collection, Nextras\Orm\Entity\IEntity $parent )
executeCounts ( DbalCollection $collection, Nextras\Orm\Entity\IEntity $parent )
fetchByOnePassStrategy ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, $hasJoin, array $values )
fetchByTwoPassStrategy ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, array $values )

Private Methods

Method Description
fetchCounts ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, array $values )
queryAndFetchEntities ( $query, $args )

Method Details

__construct() public method

public __construct ( Nextras\Dbal\Connection $connection, DbalMapper $targetMapper, PropertyMetadata $metadata )
$connection Nextras\Dbal\Connection
$targetMapper DbalMapper
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata

calculateCacheKey() protected method

protected calculateCacheKey ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, array $values )
$builder Nextras\Dbal\QueryBuilder\QueryBuilder
$values array

execute() protected method

protected execute ( DbalCollection $collection, Nextras\Orm\Entity\IEntity $parent )
$collection DbalCollection
$parent Nextras\Orm\Entity\IEntity

executeCounts() protected method

protected executeCounts ( DbalCollection $collection, Nextras\Orm\Entity\IEntity $parent )
$collection DbalCollection
$parent Nextras\Orm\Entity\IEntity

fetchByOnePassStrategy() protected method

protected fetchByOnePassStrategy ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, $hasJoin, array $values )
$builder Nextras\Dbal\QueryBuilder\QueryBuilder
$values array

fetchByTwoPassStrategy() protected method

protected fetchByTwoPassStrategy ( Nextras\Dbal\QueryBuilder\QueryBuilder $builder, array $values )
$builder Nextras\Dbal\QueryBuilder\QueryBuilder
$values array

getIterator() public method

==== ITERATOR ===================================================================================================
public getIterator ( Nextras\Orm\Entity\IEntity $parent, Nextras\Orm\Collection\ICollection $collection )
$parent Nextras\Orm\Entity\IEntity
$collection Nextras\Orm\Collection\ICollection

getIteratorCount() public method

==== ITERATOR COUNT =============================================================================================
public getIteratorCount ( Nextras\Orm\Entity\IEntity $parent, Nextras\Orm\Collection\ICollection $collection )
$parent Nextras\Orm\Entity\IEntity
$collection Nextras\Orm\Collection\ICollection

Property Details

$cacheCounts protected property

protected int[] $cacheCounts
return int[]

$cacheEntityIterator protected property

protected IEntityIterator[],Nextras\Orm\Collection $cacheEntityIterator
return Nextras\Orm\Collection\IEntityIterator[]

$connection protected property

protected Connection,Nextras\Dbal $connection
return Nextras\Dbal\Connection

$joinStorageKey protected property

protected string $joinStorageKey
return string

$metadata protected property

protected PropertyMetadata,Nextras\Orm\Entity\Reflection $metadata
return Nextras\Orm\Entity\Reflection\PropertyMetadata

$targetMapper protected property

protected DbalMapper,Nextras\Orm\Mapper\Dbal $targetMapper
return DbalMapper

$targetRepository protected property

protected IRepository,Nextras\Orm\Repository $targetRepository
return Nextras\Orm\Repository\IRepository