Create a new driver instance.

@param  string  $driver
@return mixed
341673
protected function createDriver($driver)
	{
		$guard = parent::createDriver($driver);

		// When using the remember me functionality of the authentication services we
		// will need to be set the encryption instance of the guard, which allows
		// secure, encrypted cookie values to get generated for those cookies.
		$guard->setCookieJar($this->app['cookie']);

		$guard->setDispatcher($this->app['events']);

		return $guard->setRequest($this->app->refresh('request', $guard, 'setRequest'));
	}
327032
protected function createDriver($driver)
    {
        $name = "orchestra.publisher.{$driver}";

        if (! $this->app->bound($name)) {
            throw new RuntimeException("Unable to resolve [{$driver}] publisher");
        }

        return $this->app->make($name);
    }
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;
    }
564244
public static function create( $name = null, $driver = 'file' ) 
	{
		if ( is_null( $name ) ) 
		{
			return new static( null, $driver );
		}
		
		if ( !isset( static::$instances[$name] ) ) 
		{
			static::$instances[$name] = new static( $name, $driver );
		}
		
		return static::$instances[$name];
	}
220231
private function buildDriver($name, array $driver)
    {
        return $this->drivers[$name] = new $driver['driver'](
            Arr::get($driver, 'options.'.$this->getDefaultOption(), [])
        );
    }
1265515
public static function getConnection($driver)
    {
        $driver = strtolower($driver);

        if (empty(static::$connections[$driver])) {
            return null;
        }

        return static::$connections[$driver];
    }
956955
public function createFailer($driver = null)
    {
        $driver = $driver ?: $this->config->get('queue.failer.driver', 'database');

        switch ($driver) {
            case 'database':
                $failer = new DatabaseQueueFailer(
                    $this->container->get('db'),
                    $this->config->get('queue.failer.table')
                );

                if (!$failer->isSupported()) {
                    return new NullQueueFailer();
                }

                return $failer;
                break;
            case 'pdo':
                $failer = new PdoQueueFailer(
                    $this->container->get('db')->getConnection(),
                    $this->config->get('queue.failer.table')
                );

                if ($failer->isSupported()) {
                    return new NullQueueFailer();
                }

                return $failer;
                break;
            case 'null':
            default:
                return new NullQueueFailer();
        }
    }
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;
	}
390504
protected function getBindingKeyForDriver($driver)
    {
        if (class_exists($driver)) {
            return $driver;
        }

        if ($this->app->bound($key = "hashid.driver.$driver")) {
            return $key;
        }
    }
486701
public function setDriver( IDriver $driver ) : Connection
   {

      $this->_driver = $driver;
      $this->_pdo    = null;

      return $this;

   }
967770
public function create($connection = null)
    {
        $driver = null;

        if ($connection !== false) {
            $driver = $this->createDriverByConnection($connection);
        }

        return new Queue($driver);
    }
746568
public function driver($driver = null, array $settings = [], $resolve = true)
    {
        $driver = $driver ?: $this->getDefaultDriver();

        return $this->createDriver($driver, $settings, $resolve);
    }
441708
public function make(string $driver): ClientContract
    {
        $config = $this->app->make('config')->get("microservice-client.clients.{$driver}");
        $options = $this->serviceConfig();

        switch ($config['name']) {
            case 'restful':
                return new Restful($this->app->make('client.manager'), $config, $options);
        }

        throw new InvalidArgumentException("Unsupported driver [{$config['name']}]");
    }
1101632
public function getExceptionAdapter($driver) {
		if (!isset($this->exceptionAdapters[$driver])) {
			$this->exceptionAdapters[$driver] = $this->createExceptionAdapter(
				$driver);
		}
		return $this->exceptionAdapters[$driver];
	}
664169
public static function make(array $options = [], $driver = null)
    {
        $class = null;

        if (!$driver && isset($options['driver'])) {
            $driver = $options['driver'];
            unset($options['driver']);
        }

        /** @var LockInterface $class */
        if (isset(self::$driverMap[$driver])) {
            $class = self::$driverMap[$driver];

        } else {
            foreach ([self::DRIVER_SEM, self::DRIVER_FILE] as $name) {
                $class = self::$driverMap[$name];

                if ($class::isSupported()){
                    break;
                }
            }
        }

        if (!$class) {
            throw new \RuntimeException('No available driver! MAP: ' . implode(',', self::$driverMap));
        }

        return new $class($options);
    }
330858
public function getDriver($driver = null, array $config = [])
    {
        $driver = strtolower($driver);

        if (!isset($this->drivers[$driver])) {
            $this->drivers[$driver] = $this->createDriver($driver, $config);
        }

        return $this->drivers[$driver];
    }
1310624
public function driver( $driver )
	{
		$driver = CCCORE_NAMESPACE.'\\'.'CCConfig_'.ucfirst( $driver );
		
		if ( !class_exists( $driver ) ) 
		{
			throw new \InvalidArgumentException("CCConfig - Invalid driver '".$driver."'");
		}
		
		$this->_driver = new $driver;
	}