public function setParameter($key, $value)
    {
        $path = explode('.', $key);

        $this->validateParameter($key, $value);


        $root = array();
        $r = &$root;
        foreach($path as $subNode) {
            $r[$subNode] = array();
            $r = &$r[$subNode];
        }
        $r = $value;
        $r = &$root;

        if ($this->parameters) {
            $parameters = $this->parameters->extract();
        }
        else {
            $parameters = array();
        }

        $this->parameters = new ArrayResolver(Arrays::mergeRecursiveUnique($parameters, $r));
        return $this;
    }