PHP 클래스 ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\AbstractFilter

Abstract class with helpers for easing the implementation of a filter.
저자: Kévin Dunglas ([email protected])
저자: Théo FIDRY ([email protected])
상속: implements ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\FilterInterface
파일 보기 프로젝트 열기: api-platform/core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$logger
$managerRegistry
$properties
$requestStack

공개 메소드들

메소드 설명
__construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, Psr\Log\LoggerInterface $logger = null, array $properties = null )
apply ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )

보호된 메소드들

메소드 설명
addJoinOnce ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $association ) : string Adds a join to the queryBuilder if none exists.
addJoinsForNestedProperty ( string $property, string $rootAlias, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator ) : array Adds the necessary joins for a nested property.
extractProperties ( Request $request ) : array Extracts properties to filter from the request.
filterProperty ( string $property, mixed $value, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null ) Passes a property through the filter.
getClassMetadata ( string $resourceClass ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Gets class metadata for the given resource.
getNestedMetadata ( string $resourceClass, array $associations ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Gets nested class metadata for the given resource.
isPropertyEnabled ( string $property ) : boolean Determines whether the given property is enabled.
isPropertyMapped ( string $property, string $resourceClass, boolean $allowAssociation = false ) : boolean Determines whether the given property is mapped.
isPropertyNested ( string $property ) : boolean Determines whether the given property is nested.
splitPropertyParts ( string $property ) : array Splits the given property into parts.

비공개 메소드들

메소드 설명
getExistingJoin ( Doctrine\ORM\QueryBuilder $queryBuilder, string $alias, string $association ) : Doctrine\ORM\Query\Expr\Join | null Get the existing join from queryBuilder DQL parts.

메소드 상세

__construct() 공개 메소드

public __construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, Psr\Log\LoggerInterface $logger = null, array $properties = null )
$managerRegistry Doctrine\Common\Persistence\ManagerRegistry
$requestStack Symfony\Component\HttpFoundation\RequestStack
$logger Psr\Log\LoggerInterface
$properties array

addJoinOnce() 보호된 메소드

Adds a join to the queryBuilder if none exists.
protected addJoinOnce ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $association ) : string
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$alias string
$association string the association field
리턴 string the new association alias

addJoinsForNestedProperty() 보호된 메소드

Adds the necessary joins for a nested property.
protected addJoinsForNestedProperty ( string $property, string $rootAlias, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator ) : array
$property string
$rootAlias string
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
리턴 array An array where the first element is the join $alias of the leaf entity, the second element is the $field name the third element is the $associations array

apply() 공개 메소드

public apply ( 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

extractProperties() 보호된 메소드

Extracts properties to filter from the request.
protected extractProperties ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
리턴 array

filterProperty() 추상적인 보호된 메소드

Passes a property through the filter.
abstract protected filterProperty ( string $property, mixed $value, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
$property string
$value mixed
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$operationName string

getClassMetadata() 보호된 메소드

Gets class metadata for the given resource.
protected getClassMetadata ( string $resourceClass ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$resourceClass string
리턴 Doctrine\Common\Persistence\Mapping\ClassMetadata

getNestedMetadata() 보호된 메소드

Gets nested class metadata for the given resource.
protected getNestedMetadata ( string $resourceClass, array $associations ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$resourceClass string
$associations array
리턴 Doctrine\Common\Persistence\Mapping\ClassMetadata

isPropertyEnabled() 보호된 메소드

Determines whether the given property is enabled.
protected isPropertyEnabled ( string $property ) : boolean
$property string
리턴 boolean

isPropertyMapped() 보호된 메소드

Determines whether the given property is mapped.
protected isPropertyMapped ( string $property, string $resourceClass, boolean $allowAssociation = false ) : boolean
$property string
$resourceClass string
$allowAssociation boolean
리턴 boolean

isPropertyNested() 보호된 메소드

Determines whether the given property is nested.
protected isPropertyNested ( string $property ) : boolean
$property string
리턴 boolean

splitPropertyParts() 보호된 메소드

Returns an array with the following keys: - associations: array of associations according to nesting order - field: string holding the actual field (leaf node)
protected splitPropertyParts ( string $property ) : array
$property string
리턴 array

프로퍼티 상세

$logger 보호되어 있는 프로퍼티

protected $logger

$managerRegistry 보호되어 있는 프로퍼티

protected $managerRegistry

$properties 보호되어 있는 프로퍼티

protected $properties

$requestStack 보호되어 있는 프로퍼티

protected $requestStack