Skip to content
Snippets Groups Projects
FacetCategory.php 375 B
<?php

namespace IQDEV\ElasticSearch\Facet;

use IQDEV\ElasticSearch\Esable;

final class FacetCategory implements Esable
{
    private string $category;

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

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