Is this driver supported.
@param string $driver
@return bool
493741
public static function isSupported(string $driver): bool
    {
        if ($driver === self::DRIVER_MONGO_DB) {
            return \extension_loaded('mongodb');
        }

        if ($driver === self::DRIVER_MONGO) {
            return \extension_loaded('mongo');
        }

        return false;
    }
40316
protected function setupDriverConfig(string $driver): ?array
    {
        if (isset($this->config[$driver])) {
            return null;
        }

        if (\is_null($config = Arr::pull($this->config, "drivers.{$driver}"))) {
            return null;
        }

        $connection = $this->config['connection'] ?? null;

        if (! \is_null($connection) && $this->driverExcludedByOptions($driver, $connection['options'])) {
            $connection = null;
        }

        return $this->config[$driver] = \array_merge($config, ['connection' => $connection]);
    }
413211
public function driver(?string $driver = null): self
    {
        $driver = $driver ? $driver : $this->app->make('config')->get('microservice-client.client');

        $connections = array_keys($this->app->make('config')->get('microservice-client.clients'));
        if (! in_array($driver, $connections, true)) {
            throw new DomainException("The Driver[{$driver}] not exists");
        }

        $this->driver = $driver;

        return $this;
    }
909060
protected function tagMatched(
        /*# string */ $tag,
        DriverInterface $driver
    )/*# bool */ {
        // '' matches all
        if ('' === $tag) {
            return true;
        }

        // tag matched
        if ($driver instanceof TagAwareInterface && $driver->hasTag($tag)) {
            return true;
        }

        return false;
    }
1065515
public function driver(string $driver)
    {
        if (isset($this->drivers[$driver])) {
            $provider = $driver . 'Provider';
            if (method_exists($this, $provider)) {
                return $this->$provider();
            }

            return new $this->drivers[$driver](
                $this->getRequest(),
                $this->config,
                $this->getSession()
            );
        }

        if (class_exists($driver)) {
            $driver = new $driver(
                $this->getRequest(),
                $this->config,
                $this->getSession()
            );

            if ($driver instanceof Two\AbstractProvider) {
                return $driver;
            }
        }

        throw new \InvalidArgumentException("Driver not supported.");
    }
937557
public static function driver(string $name){

            //Get the name.
            $name = explode(':', $name);
            //Get the classname.
            $class = "\\NonDB\\Drivers\\" . $name[0];
            //Get the parameter.
            $param = $name[1];

            //See if the driver exists.
            if(!class_exists($class) || !( \NonDB\Components\Tool::checkImplement($class, "NonDB\\Interfaces\\Driver") )){
                throw new \NonDB\Exceptions\CoreException("Driver $class wasn't exists.", "0011");
                return false;
            }

            //Get driver.
            $driver = eval("return new $class(urldecode(\$param));");

            return $driver;

        }
1337851
public function setDriver($driver)
    {
        $availableDrivers = array(DataGridInterface::ARRAY_DRIVER, DataGridInterface::ORM_DRIVER);
        
        if (!in_array($driver, $availableDrivers)){
            throw new \InvalidArgumentException(sprintf('Driver %s is not available.', $driver));
        }
        
        $this->driver = $driver;
        
        return $this;
    }
217840
protected function setDriver($driver){
		if(strcasecmp($driver, 'sqlite') === 0) // Backward compatibility
			$driver = 'SQLite2';

		$class = "Neevo\\Drivers\\{$driver}Driver";

		if(!class_exists($class)){
			$file = __DIR__ . '/Drivers/' . strtolower($driver) . '.php';
			if(!file_exists($file))
				throw new DriverException("$driver driver file ($file) does not exist.");
			if(is_readable($file))
				include_once $file;
			else
				throw new DriverException("$driver driver file ($file) is not readable.");
		}
		if(!$this->isDriver($class))
			throw new DriverException("Class '$class' is not a valid Neevo driver class.");

		$this->driver = new $class;

		// Set statement parser
		if($this->isParser($class))
			$this->parser = $class;
	}
933307
protected function createDriver($driver)
    {
        try {
            return parent::createDriver($driver);
        } catch (Exception $e) {
            if ($newDriver = $this->nextDriver($driver)) {
                return $this->createDriver($newDriver);
            }
            throw $e;
        }
    }
1067430
public static function setDriver(string $driver)
    {
        if ( ! self::isValidDriver($driver)) {
            throw new \InvalidArgumentException("invalid session driver '$driver'");
        }

        self::$driver = $driver;
    }
693379
public function isDriverCodeValid(DriverInterface $driver, $mode = self::MODE_RETURN_BOOLEAN)
    {
        return $this->isValid($driver->getCode(), $mode, __METHOD__);
    }
460787
public function isAllowExport(Driver $driver, $requestRecords)
    {
        $this->managerFactory->setModelClass($this->modelClass);
        $totalResult = $this->managerFactory->getManager($driver)->count();
        if ($requestRecords < $totalResult) {
            return false;
        }

        return true;
    }
193194
protected function createDriver($driver)
    {
        // We'll check to see if a creator method exists for the given driver. If not we
        // will check for a custom driver creator, which allows developers to create
        // drivers using their own customized driver creator Closure to create it.
        if (isset($this->customCreators[$driver])) {
            return $this->callCustomCreator($driver);
        } else {
            $method = 'create'.Stringy::create($driver)->upperCamelize().'Driver';

            if (method_exists($this, $method)) {
                return $this->$method();
            }
        }
        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }
373730
protected function createConfigurationAdapter($driver)
    {
        switch ($driver) {
            case self::DRIVER_MYSQL:
            case self::DRIVER_PGSQL:
            case self::DRIVER_SQLSRV:
                return new SqlAdapter();
            case self::DRIVER_SQLITE:
                return new SqliteAdapter();
            default:
                throw new Exception("Driver '{$driver}' is not supported.");
        }
    }
182227
public function setDriver($driver)
    {
        $driver = strtolower($driver);

        if (!in_array($driver, self::$allowedDrivers)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects argument 1 to be one of %s, %s provided instead',
                __METHOD__,
                implode(',', self::$allowedDrivers),
                $driver
            ));
        }

        $this->driver = $driver;

        return $this;
    }
756398
public function checkEnabledInArea($driver)
    {
        $area = $this->user->getArea();
        if (!$this->authProviderService->isDriverEnabledForArea($driver, $area)) {
            throw new Exception('Api is not supported for user area.');
        }
        return $this;
    }
572636
public function isValidDriverClass($className)
    {
        if (!class_exists($className)) {
            return false;
        }

        if (!is_subclass_of($className, 'Bex\\Behat\\ExtensionDriverLocator\\DriverInterface')) {
            return false;
        }

        if (!empty($this->parent) && !is_subclass_of($className, $this->parent)) {
            return false;
        }

        return true;
    }