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

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

Visits the facet builder tree into a hash representation of Elasticsearch aggregations. More...

Inheritance diagram for eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor:

## Public Member Functions
| canMap ($name)
| Check if visitor is applicable to current facet result. More...
| map ($name, $data)
| Map Elasticsearch facet result back to facet objects. More...
| canVisit (FacetBuilder $facetBuilder)
| Check if visitor is applicable to current facet builder. More...
| visit (FacetBuilder $facetBuilder)
| Map facet builder to a proper Elasticsearch representation. More...

## Protected Member Functions
| mapData ($data)
| Map Elasticsearch return array into a sane hash map. More...

## Detailed Description

Visits the facet builder tree into a hash representation of Elasticsearch aggregations.

Deprecated:

Definition at line 16 of file FacetBuilderVisitor.php.

## Member Function Documentation

## ◆ canMap()

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor::canMap | ( |  | $name | ) |
| abstract

Check if visitor is applicable to current facet result.

Parameters

  string | $name |

Returns
  bool

Reimplemented in eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\User, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Section, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\ContentType, and eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Aggregate.

## ◆ canVisit()

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor::canVisit | ( | FacetBuilder | $facetBuilder | ) |
| abstract

Check if visitor is applicable to current facet builder.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder | $facetBuilder |

Returns
  bool

Reimplemented in eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\User, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Section, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\ContentType, and eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Aggregate.

## ◆ map()

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor::map | ( |  | $name,
|  |  | $data
| ) |  |
| abstract

Map Elasticsearch facet result back to facet objects.

Parameters

  string | $name |
  mixed | $data |

Returns
  \eZ\Publish\API\Repository\Values\Content\Search\Facet

Reimplemented in eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\User, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Section, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\ContentType, and eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Aggregate.

## ◆ mapData()

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor::mapData | ( |  | $data | ) |
| protected

Map Elasticsearch return array into a sane hash map.

Parameters

  mixed | $data |

Returns
  array

Definition at line 62 of file FacetBuilderVisitor.php.

Referenced by eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\ContentType\map(), eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Section\map(), and eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\User\map().

## ◆ visit()

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor::visit | ( | FacetBuilder | $facetBuilder | ) |
| abstract

Map facet builder to a proper Elasticsearch representation.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder | $facetBuilder |

Returns
  mixed Hash representation of Elasticsearch aggregations

Reimplemented in eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\User, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Section, eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\ContentType, and eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Aggregate.

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

- FacetBuilderVisitor.php

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