本文整理汇总了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']);
}