public function getDriver($name = null)
    {
        $name = strtolower($name) ?: $this->defaultDriverName;

        if (null === $name) {
            throw new \InvalidArgumentException('Specify a Drupal driver to get.');
        }

        if (!isset($this->drivers[$name])) {
            throw new \InvalidArgumentException(sprintf('Driver "%s" is not registered', $name));
        }

        $driver = $this->drivers[$name];

        // Bootstrap driver if needed.
        if (!$driver->isBootstrapped()) {
            $driver->bootstrap();
        }

        return $driver;
    }