Get driver name.

@param  string  $driverName

@return array
198757
protected function getDriverName($driverName)
    {
        if (false === strpos($driverName, '.')) {
            $driverName = "{$driverName}.default";
        }

        list($driver, $name) = explode('.', $driverName, 2);


        $this->checkNameIsNotBlacklisted($name);

        return [$driver, $name];
    }
522841
protected function driverMatcher(/*# string */ $tag)/*# : array */
    {
        $matched = [];
        foreach ($this->drivers as $id => $driver) {
            if ($this->tagMatched($tag, $driver) && $this->pingDriver($driver)) {
                $this->expandWithFactor($matched, $id);
            }
        }
        return $matched;
    }
649718
public function getDriverNameByWeight()
    {
        $count = $base = 0;
        $map = [];
        foreach ($this->drivers as $driver) {
            $count += $driver->weight;
            if ($driver->weight) {
                $max = $base + $driver->weight;
                $map[] = [
                    'min'    => $base,
                    'max'    => $max,
                    'driver' => $driver->name,
                ];
                $base = $max;
            }
        }
        if ($count <= 0) {
            return;
        }
        $number = mt_rand(0, $count - 1);
        foreach ($map as $data) {
            if ($number >= $data['min'] && $number < $data['max']) {
                return $data['driver'];
            }
        }
    }
62734
private function nextDriver($driverName)
    {
        $driverOrder = config('cache_fallback.fallback_order');
        if (in_array($driverName, $driverOrder, true) && last($driverOrder) !== $driverName) {
            $nextKey = array_search($driverName, $driverOrder, true) + 1;
            return $driverOrder[$nextKey];
        }
        return null;
    }
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];
    }
685696
protected function getMappingCompilerPassInfo(string $driverType): array
    {
        switch ($driverType) {
            case SyliusResourceBundle::DRIVER_DOCTRINE_MONGODB_ODM:
                @trigger_error(sprintf(
                    'The "%s" driver is deprecated in Sylius 1.3. Doctrine MongoDB and PHPCR will no longer be supported in Sylius 2.0.',
                    $driverType
                ), \E_USER_DEPRECATED);

                $mappingsPassClassname = DoctrineMongoDBMappingsPass::class;

                break;
            case SyliusResourceBundle::DRIVER_DOCTRINE_ORM:
                $mappingsPassClassname = DoctrineOrmMappingsPass::class;

                break;
            case SyliusResourceBundle::DRIVER_DOCTRINE_PHPCR_ODM:
                @trigger_error(sprintf(
                    'The "%s" driver is deprecated in Sylius 1.3. Doctrine MongoDB and PHPCR will no longer be supported in Sylius 2.0.',
                    $driverType
                ), \E_USER_DEPRECATED);

                $mappingsPassClassname = DoctrinePhpcrMappingsPass::class;

                break;
            default:
                throw new UnknownDriverException($driverType);
        }

        $compilerPassMethod = sprintf('create%sMappingDriver', ucfirst($this->mappingFormat));

        return [$mappingsPassClassname, $compilerPassMethod];
    }
181482
public function getQueueDriver($queueName)
    {
        $prefix = SmartboxIntegrationFrameworkExtension::QUEUE_DRIVER_PREFIX.$queueName;

        return $this->container->get($prefix);
    }
717693
public function getUser($driverName)
    {
        $data = session()->get("codex.auth.logins.{$driverName}");
        $user = new User();
        $user->map($data);
        return $user;
    }
641130
public static function resolve($name)
    {
        // Only resolve once
        if (isset(static::$resolved[$name])) {
            return static::$resolved[$name];
        }

        if ($driver = self::getInstance()->get($name)) {
            event(get_class(self::getInstance()) . ':resolved', $driver);

            return $driver;
        }

        throw new DriverNotRegistered("Driver {$name} not registered");
    }
629772
public static function driver($name = 'default', $driverName = null)
    {
        if ($name !== null && $driverName === null) {
            $databaseConfig = self::getConnectionConfiguration($name);
            $driverName = $databaseConfig['driver'];
        }

        // Make the driver if we don't have it already this run.
        if (! isset(self::$drivers[$driverName])) {
            // We will make the driver class first, prepare the full class name.
            $driverClass = new \ReflectionClass("\\Arvici\\Heart\\Database\\Driver\\$driverName\\Driver");

            self::$drivers[$driverName] = $driverClass->newInstance();
        }

        return self::$drivers[$driverName];
    }
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;

        }
1026644
public function getDriver($key) {
        if (isset($this->_drivers[$key])) {
            return $this->_drivers[$key];
        }

        throw new MissingDriverException(sprintf('Driver %s does not exist', $key));
    }
1008176
public static function getDsn(array $options = [], $driver = null): string
    {
        if (isset($options['dsn'])) {
            return $options['dsn'];
        }

        self::$options = $options;

        if (!$driver) {
            $driver = $options['driver'] ?? null;
        }

        if (!$driver) {
            throw new \InvalidArgumentException('The driver name is required.');
        }

        if (!\is_callable([static::class, $driver])) {
            throw new \InvalidArgumentException('The ' . $driver . ' driver is not supported.');
        }

        list($dsn, $replace) = static::$driver();

        $dsn = \strtr($dsn, $replace);

        self::$options = [];

        return $dsn;
    }
338226
protected function getConfig($name)
    {
        $config = $this->app['config']['picture'];
        $driverConfig = isset($config['disks'][$name]) ? $config['disks'][$name] : [];
        if (!isset($driverConfig['sizeList'])) {
            $driverConfig['sizeList'] = $config['sizeList'];
        }
        if (!isset($driverConfig['quality'])) {
            $driverConfig['quality'] = $config['quality'];
        }
        return $driverConfig;
    }
582033
public function driver_name()
	{
		// Make sure the database is connected
		$this->_connection or $this->connect();

		// Getting driver name
		return $this->_connection->getAttribute(\PDO::ATTR_DRIVER_NAME);
	}
137623
public function getDrivers()
    {
        $drivers = array();

        $files = $this->finder->files()->in($this->driverPath)->name($this->fileTypes);

        foreach ($files as $file) {
            $driver = str_replace('.yml', '', $file->getRelativePathname());
            $service = $this->getService($driver);

            if ($service and $servers = $service->getServers()) {
                foreach ($servers as $server) {
                    $drivers[$driver . ':' . $server] = $driver . ':' . $server;
                }
            }
        }

        return $drivers;
    }
1103983
public function getDriverName()
    {
        $value = $this->getValue();

        $value = explode(":", $value);

        $driver = reset($value);

        return $driver;
    }