Starts Mink session.
Currently supported drivers: selenium.

@param string $driver
323119
public function startMinkSession($driver = '')
    {
        $this->stopMinkSession();
        $this->currentMinkDriver = $driver ? $driver : $this->currentMinkDriver;

        $driverInterface = $this->_getMinkDriver($this->currentMinkDriver);
        self::$minkSession = new \Behat\Mink\Session($driverInterface);
        self::$minkSession->start();
    }
984999
public function setDriver($driver_name)
	{
		if ( !is_string($driver_name) ) {
			throw new \InvalidArgumentException('The Mink driver name must be a string');
		}

		$this->_driverFactory = $this->_driverFactoryRegistry->get($driver_name);
		$this->_mergedDefaults = self::arrayMergeRecursive($this->defaults, $this->_driverFactory->getDriverDefaults());

		return $this->setParameter('driver', $driver_name);
	}
698077
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' . Str::studly($driver) . 'Driver';

            if (method_exists($this, $method)) {
                return $this->$method();
            }
        }
        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }
1342748
public static function setDriver($driver)
        {
            if (self::isDriverSupported($driver) == false) {
                throw new Exception('The selected database is not supported: "' . $driver . '".');
            }
            self::$driver = $driver;
        }
1159031
Driver provideHiveDriver() {
    HiveConf hiveConf = provideHiveConf();
    SessionState.start(hiveConf);

    return new Driver(hiveConf);
  }
1108004
private static function isValidDriver(string $driver): bool
    {
        return
            class_exists($driver) &&
            Arr::contains(class_implements($driver), StorageInterface::class);
    }
761921
public function run(&$request)
    {
        $this->detect($request);
        $request = $this->driver->formatIncomingRequest($request);
    }
686975
public function loadDriver(string $key): DriverInterface
    {
        if (!$this->hasDriver($key)) {
            throw new DriverNotFoundException('Driver you are looking for doesn\'t exist. Make sure that ' . $key . ' driver is properly configured.');
        }

        return $this->drivers[$key]::install($this);
    }
628255
public function remove(string $key): void
    {
        if (!$this->has($key)) {
            throw new DriverNotFoundException('Driver you are looking for doesn\'t exist. Make sure that ' . $key . ' driver is properly configured.');
        }

        unset($this->drivers[$key]);
    }
1122966
function LoadDriver($driver) {
		$driver = strtolower($driver);
		if ($driver == $this->_activeDriver) // Already loaded this driver
			return TRUE;
		if (!file_exists($file = dirname(__FILE__) . "/drivers/$driver.php"))
			return;
		require_once($file);
		$driverName = "RefLib_" . ucfirst($driver);
		$this->driver = new $driverName();
		$this->driver->parent = $this;
		$this->_activeDriver = $driver;
		return TRUE;
	}
1028829
public function updateDriver($driver, array $settings = [])
    {
        $this->validateDriver($driver);
        $this->driversToUpdate[$driver] = $settings;
    }
1076779
public static function driverClass($driver) {
        if ($driver instanceof PDO) {
            $name = $driver->getAttribute(PDO::ATTR_DRIVER_NAME);
        } else {
            $name = (string)$driver;
        }

        $name = strtolower($name);
        return isset(self::$drivers[$name]) ? self::$drivers[$name] : null;
    }
578778
public function createDriver(BrowserConfiguration $browser)
	{
		if ( !class_exists('Behat\Mink\Driver\Selenium2Driver') ) {
			throw new \RuntimeException(
				'Install MinkSelenium2Driver in order to use selenium2 driver.'
			);
		}

		$browser_name = $browser->getBrowserName();
		$capabilities = $browser->getDesiredCapabilities();
		$capabilities['browserName'] = $browser_name;

		// TODO: Maybe doesn't work!
		ini_set('default_socket_timeout', $browser->getTimeout());

		$driver = new \Behat\Mink\Driver\Selenium2Driver(
			$browser_name,
			$capabilities,
			'http://' . $browser->getHost() . ':' . $browser->getPort() . '/wd/hub'
		);

		return $driver;
	}
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;
    }
56627
public static function registerDrivers(array $drivers = [])
    {
        $manager = static::getInstance();

        foreach ($drivers as $name => $driver) {
            if (!in_array($name, $manager->excluded)) {
                $class = __NAMESPACE__ . '\\' . studly_case($name) . 'CacheProvider';

                if (class_exists($class)) {
                    $driver = (new $class())->configure($driver);
                    $manager->register($driver);
                } else {
                    throw new DriverNotFound("Cache driver {$name} is not supported");
                }
            }
        }
    }
948355
public function addMatcherDriver(MatcherDriver $driver): void
    {
        if (!in_array($driver, $this->drivers, true)) {
            $this->drivers[] = $driver;

            if ($driver->isAvailable()) {
                foreach ($driver->matcherClassNames() as $className) {
                    $this->driverIndex[$className] = $driver;
                }
            }
        }
    }
852555
public function setDriver($driver) {

    	if(false === is_string($driver)) {
    		return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($driver)), E_USER_ERROR);
    	}

        if(false === class_exists($driver)) {

            $driver = __NAMESPACE__ . '\\Driver\\' . $driver;
        
            if(false === class_exists($driver)) {
        		return trigger_error(sprintf('Driver "%s" does not exists', $driver), E_USER_ERROR);
        	}
        }

        $this -> driver = $driver;

        return $this;
    }