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

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

Visits the facet builder tree into a Elasticsearch query. More...

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

## Public Member Functions
| __construct (array $visitors=[])
| Construct from optional visitor array. More...
| addVisitor (FacetBuilderVisitor $visitor)
| Adds visitor. More...
| 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 Attributes
| $visitors = []

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor
| mapData ($data)
| Map Elasticsearch return array into a sane hash map. More...

## Detailed Description

Visits the facet builder tree into a Elasticsearch query.

Todo:
  find better method to map for type/name

Definition at line 19 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Construct from optional visitor array.

Parameters

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

Definition at line 33 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

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

## Member Function Documentation

## ◆ addVisitor()

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor\Aggregate::addVisitor | ( | FacetBuilderVisitor | $visitor | ) |

Adds visitor.

Parameters

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

Definition at line 45 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

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

## ◆ canMap()

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

Check if visitor is applicable to current facet result.

Parameters

  string | $name |

Returns
  bool

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor.

Definition at line 57 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

## ◆ canVisit()

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

Check if visitor is applicable to current facet builder.

Parameters

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

Returns
  bool

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor.

Definition at line 90 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

## ◆ map()

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

Map Elasticsearch facet result back to facet objects.

Parameters

  string | $name |
  mixed | $data |

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

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor.

Definition at line 70 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

## ◆ visit()

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

Map facet builder to a proper Elasticsearch representation.

Exceptions

Reimplemented from eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor.

Definition at line 104 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

## Member Data Documentation

## ◆ $visitors

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

Definition at line 26 of file Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php.

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

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

- Search/Elasticsearch/Content/FacetBuilderVisitor/Aggregate.php

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