本文整理匯總了PHP中Illuminate\Filesystem\FilesystemManager::createLocalDriver方法的典型用法代碼示例。如果您正苦於以下問題:PHP FilesystemManager::createLocalDriver方法的具體用法?PHP FilesystemManager::createLocalDriver怎麽用?PHP FilesystemManager::createLocalDriver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Filesystem\FilesystemManager
的用法示例。
在下文中一共展示了FilesystemManager::createLocalDriver方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createLocalDriver
public function createLocalDriver(array $config)
{
$permissions = isset($config['permissions']) ? $config['permissions'] : [];
$links = Arr::get($config, 'links') === 'skip' ? DistributedAdapter::SKIP_LINKS : DistributedAdapter::DISALLOW_LINKS;
if (array_key_exists('distributed', $config)) {
if ($config['distributed']) {
return $this->adapt($this->createDistributedFilesystem(new DistributedAdapter($config['root'], LOCK_EX, $links, $permissions), $config));
}
}
return parent::createLocalDriver($config);
}
示例2: createLocalDriver
/**
* Create an instance of the local driver.
*
* @param array $config
* @return \Illuminate\Contracts\Filesystem\Filesystem
* @static
*/
public static function createLocalDriver($config)
{
return \Illuminate\Filesystem\FilesystemManager::createLocalDriver($config);
}
示例3: createLocalDriver
/**
* {@inheritdoc}
*/
public function createLocalDriver(array $config)
{
if ($this->skipOverride()) {
$adapter = parent::createLocalDriver($config);
} else {
$adapter = $this->adapt($this->createFlysystem(parent::createLocalDriver($config)->getAdapter(), $config));
}
return $adapter;
}