protected function setParameter($name, $value)
    {
        if (!is_scalar($name)) {
            throw new \Exception('Parameter name must be scalar');
        }
        $this->parameters[$name] = $value;
        return $this;
    }