本文整理汇总了PHP中OC_App::getStorage方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_App::getStorage方法的具体用法?PHP OC_App::getStorage怎么用?PHP OC_App::getStorage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_App
的用法示例。
在下文中一共展示了OC_App::getStorage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeETagHook
public static function removeETagHook($params, $root = false)
{
if (isset($params['path'])) {
$path = $params['path'];
} else {
$path = $params['oldpath'];
}
if ($root) {
// reduce path to the required part of it (no 'username/files')
$fakeRootView = new OC_FilesystemView($root);
$count = 1;
$path = str_replace(OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count);
}
$path = self::normalizePath($path);
OC_Connector_Sabre_Node::removeETagPropertyForPath($path);
}
示例2: getStorage
/**
* @param string appid
* @param $app app
* @return \OC\Files\View
*/
public static function getStorage($app)
{
return \OC_App::getStorage($app);
}
示例3: file_exists
$zip->addFile($file, $local);
}
//debug
//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;
//close the zip -- done!
$zip->close();
//check to make sure the file exists
return file_exists($destination);
} else {
return false;
}
}
$files_to_zip = array(\OCP\Util::linkToAbsolute('impressionist', 'css/mappingstyle.css') => '/css/mappingstyle.css', \OCP\Util::linkToAbsolute('impressionist', 'css/player.css') => '/css/style.css', \OCP\Util::linkToAbsolute('', 'js/jquery-1.7.2.min.js') => '/js/jquery.js', \OCP\Util::linkToAbsolute('impressionist', "output/'.{$filename}.'.html") => $filename . '.html');
//if true, good; if false, zip creation failed
$result = create_zip($files_to_zip, $filename . '.zip');
$save_file = OC_App::getStorage('impressionist');
$save_file->file_put_contents($result . '.zip', $files_to_zip . '.zip');
?>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Impressionist for ownCloud</title>
<link rel="stylesheet" type="text/css" src="<?php
echo \OCP\Util::linkToAbsolute('impressionist', 'css/bootstrap.css');
?>
"></script>
<link rel="stylesheet" type="text/css" href="<?php
echo \OCP\Util::linkToAbsolute('impressionist', 'css/mainstyle.css');
?>
" />
<script type="text/javascript" src="<?php