public function setup($configurations = array())
    {
        foreach ($configurations as $key => $value) {
            if (!$this->registry->config->has($key)) {
                throw new \RuntimeException(sprintf('Unknown setup key %s.', $key));
            }
            if ($this->registry->validator->has($key)) {
                $validator = $this->registry->validator->get($key);
                if (!$validator->isValid($value)) {
                    if (count($choices = $validator->getChoices())) {
                        throw new \RuntimeException(sprintf('Invalid value %s for %s, values are %s.', var_export($value, true), $key, implode(', ', $choices)));
                    } else {
                        throw new \RuntimeException(sprintf('Invalid value %s for %s.', var_export($value, true), $key));
                    }
                }
            }
            $this->registry->config->set($key, $value);
        }

        return $this;
    }