Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Simple.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler;
8
9 use eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler;
10 use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
11 use eZ\Publish\Core\Persistence\Database\SelectQuery;
12
19 class Simple extends Handler
20 {
30 public function handle(SelectQuery $query, Criterion $criterion, $column)
31 {
32 // For "Simple" FieldTypes, handle the following as equal:
33 // - Contains
34 // - LIKE when against int column
35 if ($criterion->operator === Criterion\Operator::CONTAINS ||
36 ($criterion->operator === Criterion\Operator::LIKE && $column === 'sort_key_int')) {
37 $filter = $query->expr->eq(
38 $this->dbHandler->quoteColumn($column),
39 $query->bindValue($this->lowerCase($criterion->value))
40 );
41 } else {
42 $filter = parent::handle($query, $criterion, $column);
43 }
44
45 return $filter;
46 }
47 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\LIKE
const LIKE
Does a lookup where a the value can contain a "*" (a wildcard) in order to match a pattern.
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:29
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\CONTAINS
const CONTAINS
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:30
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion.php:15
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler\Simple
Content locator gateway implementation using the DoctrineDatabase.
Definition: Simple.php:20
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler\Simple\handle
handle(SelectQuery $query, Criterion $criterion, $column)
Generates query expression for operator and value of a Field Criterion.
Definition: Simple.php:30
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler
Content locator gateway implementation using the DoctrineDatabase.
Definition: Core/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php:20
eZ\Publish\Core\Persistence\Database\Query\bindValue
bindValue($value, $placeHolder=null, $type=PDO::PARAM_STR)
Binds the value $value to the specified variable name $placeHolder.
eZ\Publish\Core\Persistence\Database\SelectQuery
Definition: SelectQuery.php:16
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion/Ancestor.php:7
eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler
Definition: Collection.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.