PHP Class ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter

Author: Kévin Dunglas ([email protected])
Inheritance: extends AbstractFilter
Datei anzeigen Open project: api-platform/core Class Usage Examples

Protected Properties

Property Type Description
$iriConverter
$propertyAccessor

Public Methods

Method Description
__construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, ApiPlatform\Core\Api\IriConverterInterface $iriConverter, Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor = null, Psr\Log\LoggerInterface $logger = null, array $properties = null )
getDescription ( string $resourceClass ) : array

Protected Methods

Method Description
addWhereByStrategy ( string $strategy, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $field, string $value, boolean $caseSensitive ) Adds where clause according to the strategy.
createWrapCase ( boolean $caseSensitive ) : Closure Creates a function that will wrap a Doctrine expression according to the specified case sensitivity.
filterProperty ( string $property, $value, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
getIdFromValue ( string $value ) : mixed Gets the ID from an IRI or a raw ID.
normalizeValues ( array $values ) : array Normalize the values array.

Private Methods

Method Description
getType ( string $doctrineType ) : string Converts a Doctrine type in PHP type.

Method Details

__construct() public method

public __construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, ApiPlatform\Core\Api\IriConverterInterface $iriConverter, Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor = null, Psr\Log\LoggerInterface $logger = null, array $properties = null )
$managerRegistry Doctrine\Common\Persistence\ManagerRegistry
$requestStack Symfony\Component\HttpFoundation\RequestStack
$iriConverter ApiPlatform\Core\Api\IriConverterInterface
$propertyAccessor Symfony\Component\PropertyAccess\PropertyAccessorInterface
$logger Psr\Log\LoggerInterface
$properties array

addWhereByStrategy() protected method

Adds where clause according to the strategy.
protected addWhereByStrategy ( string $strategy, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $field, string $value, boolean $caseSensitive )
$strategy string
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$alias string
$field string
$value string
$caseSensitive boolean

createWrapCase() protected method

For example, "o.name" will get wrapped into "LOWER(o.name)" when $caseSensitive is false.
protected createWrapCase ( boolean $caseSensitive ) : Closure
$caseSensitive boolean
return Closure

filterProperty() protected method

protected filterProperty ( string $property, $value, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
$property string
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$operationName string

getDescription() public method

public getDescription ( string $resourceClass ) : array
$resourceClass string
return array

getIdFromValue() protected method

Gets the ID from an IRI or a raw ID.
protected getIdFromValue ( string $value ) : mixed
$value string
return mixed

normalizeValues() protected method

Normalize the values array.
protected normalizeValues ( array $values ) : array
$values array
return array

Property Details

$iriConverter protected_oe property

protected $iriConverter

$propertyAccessor protected_oe property

protected $propertyAccessor