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

Public Member Functions | Public Attributes | Protected Attributes | List of all members
eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher Class Reference

Dispatches Criterion objects to a visitor depending on the query context. More...

## Public Member Functions
| __construct (array $visitors=[])
| Construct from optional visitor array. More...
| addVisitor (CriterionVisitor $visitor)
| Adds visitor. More...
| dispatch (Criterion $criterion, $context, array $languageFilter=[])
| Map field value to a proper Elasticsearch representation. More...

## Public Attributes
const | CONTEXT_QUERY = 'query'
| Query visiting context. More...
const | CONTEXT_FILTER = 'filter'
| Filter visiting context. More...

## Protected Attributes
| $contextMethodMap
| $visitors = []

## Detailed Description

Dispatches Criterion objects to a visitor depending on the query context.

Deprecated:

Definition at line 18 of file CriterionVisitorDispatcher.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::__construct | ( | array | $visitors = `[]` | ) |

Construct from optional visitor array.

Parameters

  \eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitor[] | $visitors |

Definition at line 52 of file CriterionVisitorDispatcher.php.

References eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher\$visitors, and eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher\addVisitor().

## Member Function Documentation

## ◆ addVisitor()

eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::addVisitor | ( | CriterionVisitor | $visitor | ) |

Adds visitor.

Parameters

  \eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitor | $visitor |

Definition at line 64 of file CriterionVisitorDispatcher.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher\__construct().

## ◆ dispatch()

eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::dispatch | ( | Criterion | $criterion,
|  |  | $context,
|  | array | $languageFilter = `[]`
| ) |  |

Map field value to a proper Elasticsearch representation.

Exceptions

Definition at line 80 of file CriterionVisitorDispatcher.php.

## Member Data Documentation

## ◆ $contextMethodMap

eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::$contextMethodMap
| protected

Initial value:
= [
self::CONTEXT_QUERY => 'visitQuery',
self::CONTEXT_FILTER => 'visitFilter',
]

Definition at line 35 of file CriterionVisitorDispatcher.php.

## ◆ $visitors

eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::$visitors = []
| protected

Definition at line 45 of file CriterionVisitorDispatcher.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher\__construct().

## ◆ CONTEXT_FILTER

const eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::CONTEXT_FILTER = 'filter'

Filter visiting context.

Definition at line 28 of file CriterionVisitorDispatcher.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\find().

## ◆ CONTEXT_QUERY

const eZ\Publish\Core\Search\Elasticsearch\Content\CriterionVisitorDispatcher::CONTEXT_QUERY = 'query'

Query visiting context.

Definition at line 23 of file CriterionVisitorDispatcher.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native\find().

The documentation for this class was generated from the following file:

- CriterionVisitorDispatcher.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.