@param $parameters

@throws MalformedParametersException
969140
private function validateParameters($parameters)
    {
        $allowedParameters = [
            'chunk-size',
            'element-uuid',
            'headers',
            'ttl',
            'uuid',
        ];

        foreach (array_keys($parameters) as $key) {
            if (!in_array($key, $allowedParameters)) {
                throw new MalformedParametersException();
            }
        }
    }
1206387
public function setParameters($parameters)
    {
        // BC compatibility with 2.3-
        if (is_array($parameters)) {
            $parameterCollection = new ArrayCollection();

            foreach ($parameters as $key => $value) {
                $parameterCollection->add(new Parameter($key, $value));
            }

            $parameters = $parameterCollection;
        }

        $this->parameters = $parameters;

        return $this;
    }
100160
public function validateParameters(&$parameters)
    {
        if (!isset($parameters['username']))
        {
            throw new InvalidArgumentException(
                'The \'username\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
        elseif (!isset($parameters['password']))
        {
            throw new InvalidArgumentException(
                'The \'password\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
    }
432115
protected function createParameters($parameters)
    {
        if (is_string($parameters)) {
            $parameters = Parameters::parse($parameters);
        } else {
            $parameters = $parameters ?: array();
        }

        if ($this->defaults) {
            $parameters += $this->defaults;
        }

        return new Parameters($parameters);
    }
710681
public function addParameters(array $parameters): self
	{
		$this->parameters = (array) ConfigHelpers::merge($parameters, $this->parameters);
		return $this;
	}
1003868
protected function parseParameters($parameters)
    {
        if (isset($parameters[0])) {
            $params = json_decode($parameters[0], true);
            if ($params) {
                return $params;
            }
        }

        // If json couldn't be encoded return string as it was
        return $parameters;
    }
33206
public function post($parameters = null)
    {
        $this->setOption(CURLOPT_POST, true);
        if ($parameters !== null) {
            $this->setParameters($parameters);
        }

        return $this->execute();
    }
1370147
public static function create($parameters)
    {
        if (is_string($parameters)) {
            return self::fromString($parameters);
        }

        if (is_array($parameters)) {
            return self::fromArray($parameters);
        }

        throw new InvalidArgumentException('Invalid parameters type');
    }
1150575
private function buildParametersString($parameters)
    {
        $parts = [];

        ksort($parameters);
        foreach ($parameters as $key => $val) {
            $parts[] = sprintf('%s=%s', $key, $val);
        }

        return implode('; ', $parts);
    }
344431
public function removeParameters(array $parameters = null)
  {
    if ($this->isLocked()) {
      return $this->getObj()->removeParameters($parameters)->setLocked();
    } else {
      return parent::removeParameters($parameters);
    }
  }
888386
public function view($parameters)
    {
        if (!headers_sent()) {
            header('Content-Type: application/json;charset=utf-8');
        }

        //If JSONP requested (if callback is requested though GET)
        if (($callback = \Phramework\Phramework::getCallback())) {
            echo $callback;
            echo '([';
            echo json_encode($parameters);
            echo '])';
        } else {
            echo json_encode($parameters);
        }
    }
532733
final public function validateParameters(array $parameters)
    {
        $parameters = array_map(function ($rules) {
            if (is_bool($rules) and $rules === true) {
                return 'required';
            }

            return $rules;

        }, $parameters);

        $validator = Validator::make(Request::all(), $parameters);

        if ($validator->fails()) {
            throw new MissingParameterException(
                $validator->errors()->getMessages()
            );
        }

        return true;
    }
78735
public function add(array $parameters)
    {
        foreach ($parameters as $key => $value) {
            $this->set($key, $value);
        }
    }
1023385
private function parameters($parameters): array
    {
        $values = (!is_array($parameters)) ? [$parameters] : $parameters;

        $strings = [];

        foreach ($values as $value) {
            $strings[] = self::make($value, $this->encoding);
        }

        return $strings;
    }
776201
public function view($parameters)
    {
        self::header();

        if (!is_object($parameters)) {
            $parameters = (object)$parameters;
        }

        //Include JSON API version object
        $parameters->jsonapi = (object)[
            'version' => '1.0'
        ];

        echo json_encode($parameters);
    }
1073816
public function delete($parameters = [])
    {
        if (!is_array($parameters)) {
            if (func_num_args() !== 1) {
                $parameters = func_get_args();
            }

            $this->deleteByPrimaryKey($parameters);

            return;
        }

        $relations = $this->entity->getRelations();

        if (empty($relations)) {
            $this->manager->postPendingQuery(
                new PendingQuery(
                    $this->entity,
                    PendingQuery::TYPE_UPDATE,
                    $this->applyFilters(
                        $this->queryBuilder->delete($this->entity->getTable())
                    ),
                    $this->parameters
                )
            );
        } else {
            $this->deleteRecords(
                $this->with(array_keys($relations))
                     ->get(array_merge($this->parameters, $parameters))
            );
        }
    }
1078218
public function formatParameters($parameters)
    {
        $parameters = Arr::wrap($parameters);

        foreach ($parameters as $key => $parameter) {
            if ($parameter instanceof UrlRoutable) {
                $parameters[$key] = $parameter->getRouteKey();
            }
        }

        return $parameters;
    }