1 | <?php |
||
13 | class CriteriaConverter |
||
14 | { |
||
15 | /** |
||
16 | * Criterion handlers. |
||
17 | * |
||
18 | * @var \eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler[] |
||
19 | */ |
||
20 | protected $handlers; |
||
21 | |||
22 | /** |
||
23 | * Construct from an optional array of Criterion handlers. |
||
24 | * |
||
25 | * @param \eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler[] $handlers |
||
26 | */ |
||
27 | public function __construct(array $handlers = []) |
||
31 | |||
32 | /** |
||
33 | * Adds handler. |
||
34 | * |
||
35 | * @param \eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler $handler |
||
36 | */ |
||
37 | public function addHandler(CriterionHandler $handler) |
||
41 | |||
42 | /** |
||
43 | * Generic converter of criteria into query fragments. |
||
44 | * |
||
45 | * @throws \eZ\Publish\API\Repository\Exceptions\NotImplementedException if Criterion is not applicable to its target |
||
46 | * |
||
47 | * @param \eZ\Publish\Core\Persistence\Database\SelectQuery $query |
||
48 | * @param \eZ\Publish\API\Repository\Values\URL\Query\Criterion $criterion |
||
49 | * @return \eZ\Publish\Core\Persistence\Database\Expression|string |
||
50 | */ |
||
51 | public function convertCriteria(SelectQuery $query, Criterion $criterion) |
||
63 | } |
||
64 |