本文整理匯總了PHP中Storage::rename方法的典型用法代碼示例。如果您正苦於以下問題:PHP Storage::rename方法的具體用法?PHP Storage::rename怎麽用?PHP Storage::rename使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Storage
的用法示例。
在下文中一共展示了Storage::rename方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: rename_hook
/**
* rename/move versions of renamed/moved files
* @param array $params array with oldpath and newpath
*
* This function is connected to the rename signal of OC_Filesystem and adjust the name and location
* of the stored versions along the actual file
*/
public static function rename_hook($params)
{
if (\OCP\App::isEnabled('files_versions')) {
$oldpath = $params['oldpath'];
$newpath = $params['newpath'];
if ($oldpath != '' && $newpath != '') {
Storage::rename($oldpath, $newpath);
}
}
}
示例2: rename_hook
/**
* @brief rename/move versions of renamed/moved files
* @param array with oldpath and newpath
*
* This function is connected to the rename signal of OC_Filesystem and adjust the name and location
* of the stored versions along the actual file
*/
public static function rename_hook($params)
{
if (\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED) == 'true') {
$oldpath = $params['oldpath'];
$newpath = $params['newpath'];
if ($oldpath != '' && $newpath != '') {
Storage::rename($oldpath, $newpath);
}
}
}
示例3: changeFilenames
protected function changeFilenames()
{
//folder names
\Storage::rename($this->packageDir . '/src/VanillaModel', $this->modelDir);
\Storage::rename($this->modelDir . '/Resources/Views/pages', $this->modelDir . '/Resources/Views/' . $this->models);
\Storage::rename($this->modelDir . '/Config/pages', $this->modelDir . '/Config/' . $this->models);
//file names
\Storage::rename($this->modelDir . '/Config/authorization/pages.php', $this->files['config.authorization']);
\Storage::rename($this->modelDir . '/Config/validation/page.php', $this->files['config.validation']);
\Storage::rename($this->modelDir . '/Database/Factories/PageFactory.php', $this->files['database.factory']);
\Storage::rename($this->modelDir . '/Database/Seeds/PagesTableSeeder.php', $this->files['database.seeds']);
\Storage::rename($this->modelDir . '/Database/Migrations/create_pages_table.php', $this->files['database.migration']);
\Storage::rename($this->modelDir . '/Events/PageWasSaved.php', $this->files['events.saved']);
\Storage::rename($this->modelDir . '/Http/Controllers/PagesController.php', $this->files['http.controller']);
\Storage::rename($this->modelDir . '/Jobs/SaveNewPage.php', $this->files['jobs.save']);
\Storage::rename($this->modelDir . '/Jobs/UpdateExistingPage.php', $this->files['jobs.update']);
\Storage::rename($this->modelDir . '/Listeners/PageSavedListener.php', $this->files['listeners.saved']);
\Storage::rename($this->modelDir . '/Models/Page.php', $this->files['model']);
\Storage::rename($this->modelDir . '/Policies/PagePolicy.php', $this->files['policy']);
\Storage::rename($this->modelDir . '/Providers/LarapressPagesServiceProvider.php', $this->files['provider']);
}