PHP Класс ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\EagerLoadingExtension

Автор: Charles Sarrazin ([email protected])
Автор: Kévin Dunglas ([email protected])
Автор: Antoine Bluchet ([email protected])
Автор: Baptiste Meyer ([email protected])
Наследование: implements ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface, implements ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, integer $maxJoins = 30, boolean $forceEager = true )
applyToCollection ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
applyToItem ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, string $operationName = null, array $context = [] ) {@inheritdoc} The context may contain serialization groups which helps defining joined entities that are readable.

Приватные методы

Метод Описание
addSelect ( Doctrine\ORM\QueryBuilder $queryBuilder, string $entity, string $associationAlias, array $propertyMetadataOptions )
getSerializerGroups ( string $resourceClass, array $options, string $context ) : array Gets serializer groups if available, if not it returns the $options array.
isForceEager ( string $resourceClass, array $options ) : boolean Does an operation force eager?
joinRelations ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, boolean $forceEager, string $parentAlias, array $propertyMetadataOptions = [], boolean $wasLeftJoin = false, integer &$joinCount ) Joins relations to eager load.

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

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

public __construct ( ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, integer $maxJoins = 30, boolean $forceEager = true )
$propertyNameCollectionFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
$propertyMetadataFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface
$resourceMetadataFactory ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface
$maxJoins integer
$forceEager boolean

applyToCollection() публичный метод

public applyToCollection ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$operationName string

applyToItem() публичный метод

{@inheritdoc} The context may contain serialization groups which helps defining joined entities that are readable.
public applyToItem ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, string $operationName = null, array $context = [] )
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$identifiers array
$operationName string
$context array