本文整理匯總了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);
}