Skip to content
Snippets Groups Projects
FacetCategory.php 375 B
Newer Older
Pavel's avatar
Pavel committed
<?php

namespace IQDEV\ElasticSearch\Facet;

use IQDEV\ElasticSearch\Esable;

final class FacetCategory implements Esable
{
Pavel's avatar
Pavel committed
    private string $category;
Pavel's avatar
Pavel committed

    public function __construct(string $category)
    {
        $this->category = $category;
    }

    public function es(): array
    {
        return [
Pavel's avatar
Pavel committed
            'category_id' => $this->category,
Pavel's avatar
Pavel committed
        ];
    }
}