Sürücüyü bulur

@param string $driver
@throws DriverNotFoundException
@return mixed
558745
private function findDriver($driver = '')
    {
        if (isset($this->driverList[$driver])) {
            $driver = $this->driverList[$driver];
        } else {
            throw new DriverNotFoundException(sprintf('%s adında bir sürücü bulunamadı', $driver));
        }

        if (is_string($driver)) {
            $callableName = "create" . ucfirst($driver) . "Driver";
            $response = call_user_func([$this, $callableName]);
        } elseif (is_callable($driver)) {
            $response = $driver();
        }

        return $response;
    }
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;
	}
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]);
    }
1268714
public function getAdapter(string $driver, string $connection = null)
    {
        if (array_key_exists($driver, $this->drivers)) {
            return $this->drivers[$driver]->getAdapter($connection);
        }
    }
1342748
public static function setDriver($driver)
        {
            if (self::isDriverSupported($driver) == false) {
                throw new Exception('The selected database is not supported: "' . $driver . '".');
            }
            self::$driver = $driver;
        }
593081
public static function driver(string $driver, AbstractRepository $repository): RepositoryDriver
    {
        switch ($driver) {
            case 'eloquent':
                return new Eloquent($repository);
            default:
                throw new InvalidArgumentException("Driver [{$driver}] not found");
        }
    }
1213482
public function selectDriver($driver = null)
    {
        if (null === $driver) {
            $driver = $this->getDefaultDriver();
        }

        $driver = $this->findDriver($driver);

        if ($driver instanceof FilesystemInterface) {
            return $this->adapter($driver);
        } else {
            throw new NotSupportedException(sprintf('%s sınıfınız desteklenen bir sürücü değil', get_class($driver)));
        }
    }
694124
public function toPhinxAdapterName(Driver $driver)
    {
        if ($driver instanceof \Samurai\Onikiri\Driver\MySqlDriver) {
            return 'mysql';
        } elseif ($driver instanceof \Samurai\Onikiri\Driver\PgsqlDriver) {
            return 'pgsql';
        } elseif ($driver instanceof \Samurai\Onikiri\Driver\SqliteDriver) {
            return 'sqlite';
        }
    }
452367
public function get($driver_name)
	{
		if ( !isset($this->_registry[$driver_name]) ) {
			throw new \OutOfBoundsException(sprintf('No driver factory for "%s" driver.', $driver_name));
		}

		return $this->_registry[$driver_name];
	}
250458
public function driver($driver)
    {
        if (!isset($this->drivers[$driver])) {
            $this->drivers[$driver] = $this->createDriver($driver);
        }

        return $this->drivers[$driver];
    }
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.");
    }
1017929
public function getPurger($driver, $manager)
    {
        if (isset($this->purgerCache[$hash = sha1($driver.'.'.$manager)])) {
            return $this->purgerCache[$hash];
        }

        $manager = $this->getService($manager);

        return $this->purgerCache[$hash] = $driver === ResourceInterface::DRIVER_DOCTRINE_MONGODB
            ? new MongoDBPurger($manager)
            : new ORMPurger($manager);
    }
511366
public function driver( $driver = null )
	{
		$driver = strtolower( $driver ?: $this->getDefaultDriver() );

		// If the given driver has not been created before, we will create the instances
		// here and cache it so we can return it next time very quickly. If there is
		// already a driver created by this name, we'll just return that instance.
		if ( !array_key_exists( $driver, $this->drivers ) )
			$this->drivers[$driver] = $this->createDriver( $driver );

		return $this->drivers[$driver];
	}
390504
protected function getBindingKeyForDriver($driver)
    {
        if (class_exists($driver)) {
            return $driver;
        }

        if ($this->app->bound($key = "hashid.driver.$driver")) {
            return $key;
        }
    }
229483
public function is_supported($driver)
	{
		static $support;

		if ( ! isset($support, $support[$driver]))
		{
			$support[$driver] = $this->{$driver}->is_supported();
		}

		return $support[$driver];
	}
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);
    }
746568
public function driver($driver = null, array $settings = [], $resolve = true)
    {
        $driver = $driver ?: $this->getDefaultDriver();

        return $this->createDriver($driver, $settings, $resolve);
    }