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

namespace IQDEV\ElasticSearch\Facet;

use IQDEV\ElasticSearch\Esable;

final class FacetCategory implements Esable
{
    public string $category;

    /**
     * @param string $category
     */
    public function __construct(string $category)
    {
        $this->category = $category;
    }


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