本文整理汇总了PHP中Illuminate\Cache\CacheManager::driver方法的典型用法代码示例。如果您正苦于以下问题:PHP CacheManager::driver方法的具体用法?PHP CacheManager::driver怎么用?PHP CacheManager::driver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Cache\CacheManager
的用法示例。
在下文中一共展示了CacheManager::driver方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getStore
public static function getStore()
{
if (!static::$store) {
$manager = new CacheManager(new ConfigContainer(array('db' => \DLModel::getConnectionResolver(), 'encrypter' => Encrypter::getInstance(), 'config' => array('cache.driver' => 'database', 'cache.prefix' => 'schema_', 'cache.stores.database' => array('driver' => 'database', 'connection' => 'default', 'table' => 'cache')))));
static::$store = $manager->driver('database')->getStore();
}
return static::$store;
}
示例2: make
public static function make()
{
if (is_null(self::$instance)) {
$cacheManager = new CacheManager(array('files' => new FileSystem(), 'config' => array('cache.driver' => 'file', 'cache.path' => path('cache'), 'cache.prefix' => 'wordpress_')));
$cache = $cacheManager->driver();
self::$instance = new static($cache);
}
return self::$instance;
}
示例3: driver
/**
* Get a cache driver instance.
*
* @param string $driver
* @return mixed
* @static
*/
public static function driver($driver = null)
{
return \Illuminate\Cache\CacheManager::driver($driver);
}
示例4: driver
/**
* Get a driver instance.
*
* @param string $driver
* @return mixed
* @static
*/
public static function driver($driver = null)
{
//Method inherited from \Illuminate\Support\Manager
return \Illuminate\Cache\CacheManager::driver($driver);
}