public function disable($name)
    {
        $enabled = $this->getEnabled();

        if (($k = array_search($name, $enabled)) !== false) {
            unset($enabled[$k]);

            $extension = $this->getExtension($name);

            $this->setEnabled($enabled);

            $extension->setEnabled(false);
        }
    }