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]);
}
/**
* Checks if parameter exists.
*/
public function hasParameter(string $name): bool
{
return isset($this->parameters[$name]);
}
public function setParameters(array $parameters): static
public function addParameter(string $name, mixed $value): static
protected function processArray(array $array = []): array