Create an instance of the file cache driver

@param string $name
@param Prop $config
@return FileStore
357510
protected function createFileDriver(string $name, Prop $config)
	{
		return new FileStore(
			Filesystem::getInstance(),
			$name,
			$config->getOr("directory", "cache"),
			$config->getOr("life", 0)
		);
	}
1018981
public static function simple(array $config = []): CacheInterface
    {
        [$hash, $config] = static::getKey($config, 'cache.simple');

        if (isset(static::$pool[$hash])) {
            return static::$pool[$hash];
        }

        if (isset($config['drivers'])) {
            $drivers = $config['drivers'];
            if (\count($drivers) > 1) {
                return static::$pool[$hash] = new Chain($config);
            }

            unset($config['drivers']);

            $driver = \key($drivers);
            $config += $drivers[$driver];
        } else {
            $driver = $config['driver'] ?? 'void';
            unset($config['driver']);
        }

        switch ($driver) {
            case 'array':
            case 'zend':
                $driver = \ucfirst($driver) . 'Data';
                break;
            case 'apc':
                $driver = 'Apcu';
                break;
            default:
                $driver = \ucfirst($driver);
        }

        $class = 'Hail\\Cache\\Simple\\' . $driver;

        return static::$pool[$hash] = new $class($config);
    }
383603
protected function makeConnection($name, array $config)
	{
		$this->setOutput($connection = new Connection(

			$name, $config['host'], $config['username'], $this->getAuth($config)

		));

		return $connection;
	}
537629
public function createTwigLoaderFilesystem(TwigConfig $config) {
        $loader = new TwigLoader();

        foreach ($config->getPaths() as $path) {
            $loader->addPath($path);
        }

        foreach ($config->getNamespaces() as $namespace => $path) {
            $loader->addPath($path, $namespace);
        }

        return $loader;
    }
736212
protected function createSessionDriver($name)
    {
        $config = Arr::get($this->config, "session.{$name}", []);
        return $this->createProvider(new Session($name, $config));
    }
658270
private function createCache(array $config, ContainerBuilder $container)
    {
        $type = $config['type'];
        if (array_key_exists($type, $this->cacheFactories)) {
            $id = sprintf('tbbc_cache.%s_cache', $config['name']);
            $this->cacheFactories[$type]->create($container, $id, $config);

            return $id;
        }

        // TODO: throw exception ?
    }
838130
public function setDriver($name, array $config)
    {
        if (!isset($config['connector'])) {
            $config['connector'] = NullConnector::class;
        }

        $this->drivers[strtolower($name)] = $config;

        return $this;
    }
1112601
public function buildProcessor($name, $config)
    {
        $definitionService = $this->getDefinitionService($name);
        $definitionService->setDebug($this->container->getParameter('kernel.debug'));

        $id = $this->determineProcessorId($config);
        $def = $definitionService->buildProcessor($config, $id);
        $ref = $this->registerProcessor($def, $id);

        return $ref;
    }
1226076
public function createSessionDriver($name, $config)
    {
        $provider = $this->createUserProvider($config['provider'] ?? null);

        $guard = new SessionGuard($name, $provider, $this->app['session.store']);

        // 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.
        if (method_exists($guard, 'setCookieJar')) {
            $guard->setCookieJar($this->app['cookie']);
        }

        if (method_exists($guard, 'setDispatcher')) {
            $guard->setDispatcher($this->app['events']);
        }

        if (method_exists($guard, 'setRequest')) {
            $guard->setRequest($this->app->refresh('request', $guard, 'setRequest'));
        }

        return $guard;
    }
557414
public static function make($name, $config) {
		$required = false;
		if( $config[0] === '+' ) {
			$required = true;
			$config = substr($config, 1);
		}
		list($shortName, $type) = explodeList(':', $config, 2);
		return new static($name, $shortName, $type, $required);
	}
859847
protected function createCacheDriver(string $name): ProviderContract
    {
        $config = $this->config['cache'][$name] ?? [];
        $cache = $this->getCacheRepository($config);

        return $this->createProvider(new Cache($name, $config, $cache));
    }
1287332
public function connect($config = [], $name = false)
    {
        $this->connection = Connection::instance($config, $name);
        $query            = $this->connection->getConfig('query');

        if (__CLASS__ != trim($query, '\\')) {
            return new $query($this->connection);
        }

        $this->prefix = $this->connection->getConfig('prefix');

        return $this;
    }
9799
public static function getInstance($name, array $config, Container $repository, Repository $cache)
    {
        if (self::$oInstance == false) {
            self::$oInstance = new Registry($name, $config, $repository, $cache);
        }
        return self::$oInstance;
    }
409326
protected function registerAssetsManagerInstance($name, array $config)
	{
		$this->app->singleton("stolz.assets.group.$name", function ($app) use ($config) {

			if( ! isset($config['public_dir']))
				$config['public_dir'] = public_path();

			return new Assets($config);
		});
	}
211615
public function createSubsidiary($name, $config)
    {
        if (!is_string($name) || empty($name)) {
            return null;
        }
        $className = '';
        if (class_exists($name)) {
            $className = $name;
        } elseif (array_key_exists($name, $this->subsidiaryMap)) {
            $className = $this->getSubsidiaryClass($name);
        } else {
            return null;
        }
        return $this->create($className, $config);
    }
388121
protected function createApcDriver(string $name, Prop $config)
	{
		if( ! function_exists("apcu_store") )
		{
			throw new \RuntimeException("APCu client library is not loaded");
		}

		$cli = function_exists("php_sapi_name") && strpos( php_sapi_name(), "cli") !== false;
		$enable = in_array(strtolower( ini_get("apc.enable" . ($cli ? "_cli" : "d")) ), ["on", "1"]);
		if( !$enable )
		{
			throw new \RuntimeException("APCu is not enabled, change php/apc ini configuration file");
		}

		return new ApcStore(
			$name,
			$config->getOr("prefix", ""),
			$config->getOr("life", 0)
		);
	}
459360
public static function make($name, array $config)
    {
        $namespace = Kernel\Support\Str::studly($name);
        $application = "\\EasyWeChat\\{$namespace}\\Application";

        return new $application($config);
    }