Return the driver defined by key.

@uses Titon\Common\Registry

@return \Titon\Db\Driver
187535
public function getDriver() {
        if ($this->_driver) {
            return $this->_driver;
        }

        return $this->_driver = $this->getDatabase()->getDriver($this->getConnectionKey());
    }
1073821
public function getCache()
    {
        if (null === self::$cache) {
            if (!empty($this->appConfig['cache']['driver'])) {
                // Options definition.
                if (empty($this->appConfig['cache']['options'])) {
                    $options = array();
                } else {
                    $options = $this->appConfig['cache']['options'];
                }

                // Driver definition.
                if ('memcached' !== $this->appConfig['cache']['driver']) {
                    $className = $this->appConfig['cache']['driver'];
                } else {
                    $className = '\Towel\Cache\TowelMemcached';
                }

                // Driver instantiation
                $cacheDriver = new $className();
                $cacheDriver->setOptions($options);
            }

            self::$cache = new TowelCache($cacheDriver);
        }

        return self::$cache;
    }
119648
private function getKey()
    {
        if ($this->_key === null) {
            $this->_key = ftok(__FILE__, $this->id);
        }

        return $this->_key;
    }
1200303
public function getBindingKey()
    {
        if ($this->_bindingKey === null) {
            $this->_bindingKey = $this->isOwningSide($this->getSource()) ?
                $this->getSource()->getPrimaryKey() :
                $this->getTarget()->getPrimaryKey();
        }

        return $this->_bindingKey;
    }
679015
protected function get($key)
    {
        return $this->getFrontEndController()->fe_user->getKey(self::$types[$this->type], $key);
    }
622793
public function get($key)
	{
		@list($group, $name) = $this->id($key);

		$this->engine->setOption('cacheDir', $this->directory . DS . $group . DS);

		return $this->engine->get($name, $group);
	}
1349692
private function driverClass()
    {
        if (null == $this->driverClass) {
            $this->driverClass = $this->determineDriver($this->file);
        }
        return $this->driverClass;
    }
661935
public function key()
    {
        $extractor = $this->_key;

        return $extractor($this->_fetchCurrent(), parent::key(), $this);
    }
599468
protected function getDriver(): string
    {
        $driver = $this->argument('driver') ?: $this->getDriverFromConfig();

        if (! empty($driver)) {
            return $driver;
        }

        throw new RuntimeException('Not enough arguments (missing: "driver").');
    }
824785
public function getProvider($key) {
        if (!isset($this->providers[$key])) {
            return null;
        }
        
        return $this->providers[$key];
    }
142145
public function get($key) {
		// If the key is in factories the return new instance of class
		if (isset($this->factories[$key])) {
			return $this->factories[$key]();
		}

		// If the key is not in instances
		if (!isset($this->instances[$key])) {
			// If the key is in registry, instanciate the corresponding class and add it in instances
			if (isset($this->registry[$key])) {
				$this->instances[$key] = $this->registry[$key]();
			} else {
				// If the key is not in registry, instanciate the corresponding class and add it in instances
				$this->instances[$key] = self::newInstance($key);
			}
		}

		return $this->instances[$key];
	}
513152
public function driver($driver = null)
    {
        $driver = $driver ?: $this->getDefaultDriver();

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

        return $this->drivers[$driver];
    }
1066946
public function getDriver()
    {
        if (null === $this->driver) {
            $this->driver = $this->autodetectDriver($this->knownDrivers);
        }
        return $this->driver;
    }
390504
protected function getBindingKeyForDriver($driver)
    {
        if (class_exists($driver)) {
            return $driver;
        }

        if ($this->app->bound($key = "hashid.driver.$driver")) {
            return $key;
        }
    }
434677
public function getDriver()
    {
        // if driver status is false, we return the BlackHole driver
        if (!$this->getStatus()) {
            if (is_null(self::$nullDriver)) {
                self::$nullDriver = new Storage\BlackHole();
            }

            return self::$nullDriver;
        }

        return $this->driver;
    }
222983
protected function magicGet($key)
    {
        if (!$this->magicInited) {
            $this->magicInit();
        }
        $fields = &$this->magicFields['fields'];
        if (!array_key_exists($key, $fields)) {
            if (isset($this->magicFields['loaders'][$key])) {
                $loader = $this->magicFields['loaders'][$key];
                if ((is_string($loader)) && (substr($loader, 0, 2) == '::')) {
                    $loader = substr($loader, 2);
                    $fields[$key] = $this->$loader($key);
                } else {
                    $fields[$key] = Callback::call($loader, [$key]);
                }
            } else {
                $fields[$key] = $this->magicCreateField($key);
            }
        }
        return $fields[$key];
    }
99154
public function driver(?string $name = null)
    {
        $name = $name ?: $this->getDefaultDriver();

        return $this->drivers[$name] = $this->get($name);
    }