protected function setParameters($newParameters)
    {
        if (is_scalar($newParameters)) {
            if (!is_string($newParameters)) {
                throw new \Exception('newParameters can not be scalar');
            }
            $newParameters = $this->stringToArray($newParameters);
        }
        foreach ($newParameters as $field => $value) {
            $this->setParameter($field, $value);
        }
        return $this;
    }