Elastica\Aggregation\BucketScript::__construct PHP Method

__construct() public method

public __construct ( string $name, array | null $bucketsPath = null, string | null $script = null )
$name string
$bucketsPath array | null
$script string | null
    public function __construct($name, $bucketsPath = null, $script = null)
    {
        parent::__construct($name);
        if ($bucketsPath !== null) {
            $this->setBucketsPath($bucketsPath);
        }
        if ($script !== null) {
            $this->setScript($script);
        }
    }