33 lines
704 B
PHP
33 lines
704 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\CatalogElasticBundle\DataContext;
|
|
|
|
use KupShop\CatalogBundle\ProductList\DynamicFilterAttributes;
|
|
use KupShop\CatalogElasticBundle\Util\ElasticSpecs;
|
|
|
|
class AggregationContext extends DynamicFilterAttributes
|
|
{
|
|
private int $size;
|
|
|
|
public function __construct(
|
|
DynamicFilterAttributes $attributes,
|
|
public readonly \FilterParams $filterParams,
|
|
) {
|
|
parent::__construct(...$attributes->toArray());
|
|
|
|
$this->size = ElasticSpecs::$maxBucketSize;
|
|
}
|
|
|
|
public function getSize(): int
|
|
{
|
|
return $this->size;
|
|
}
|
|
|
|
public function setSize(int $size): void
|
|
{
|
|
$this->size = $size;
|
|
}
|
|
}
|