Elastica\Aggregation\BucketScript::toArray PHP Method

toArray() public method

public toArray ( ) : array
return array
    public function toArray()
    {
        if (!$this->hasParam('buckets_path')) {
            throw new InvalidException('Buckets path is required');
        } elseif (!$this->hasParam('script')) {
            throw new InvalidException('Script parameter is required');
        }
        return parent::toArray();
    }