Newer
Older
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\ElasticsearchDSL;
/**
* A trait which handles the behavior of parameters in queries, filters, etc.
*/
trait ParametersTrait
{
{
if ($this->hasParameter($name)) {
unset($this->parameters[$name]);
}
}
public function addParameter(string $name, mixed $value): void
$this->parameters[$name] = $value;
public function setParameters(array $parameters): static
}
/**
* Returns given array merged with parameters.
*/
protected function processArray(array $array = []): array