public function addParameter($key, $data)
    {
        if (!is_string($key)) {
            throw new \RuntimeException('Only strings can be given as parameter keys. Got "' . gettype($key) . '".');
        }

        if (!is_string($data) && !is_callable($data)) {
            throw new \RuntimeException('The "data" parameter must either be a string or a callable. . Got "' . gettype($key) . '".');
        }

        if (isset($this->parameters[$key])) {
            throw new \RuntimeException('The parameter key "' . $key . '" is already set.');
        }

        $this->parameters[$key] = $data;

        return $this;
    }