Class

eZ\Publish\Core\Search\Elasticsearch\Content\FacetBuilderVisitor

abstract class FacetBuilderVisitor

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

Methods

bool canMap(string $name)

Check if visitor is applicable to current facet result.

Facet map(string $name, mixed $data)

Map Elasticsearch facet result back to facet objects.

bool canVisit(FacetBuilder $facetBuilder)

Check if visitor is applicable to current facet builder.

mixed visit(FacetBuilder $facetBuilder)

Map facet builder to a proper Elasticsearch representation.

Details

at line 25
abstract public bool canMap(string $name)

Check if visitor is applicable to current facet result.

Parameters

string $name

Return Value

bool

at line 35
abstract public Facet map(string $name, mixed $data)

Map Elasticsearch facet result back to facet objects.

Parameters

string $name
mixed $data

Return Value

Facet

at line 44
abstract public bool canVisit(FacetBuilder $facetBuilder)

Check if visitor is applicable to current facet builder.

Parameters

FacetBuilder $facetBuilder

Return Value

bool

at line 53
abstract public mixed visit(FacetBuilder $facetBuilder)

Map facet builder to a proper Elasticsearch representation.

Parameters

FacetBuilder $facetBuilder

Return Value

mixed Hash representation of Elasticsearch aggregations