本文整理匯總了PHP中Basic::copyr方法的典型用法代碼示例。如果您正苦於以下問題:PHP Basic::copyr方法的具體用法?PHP Basic::copyr怎麽用?PHP Basic::copyr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Basic
的用法示例。
在下文中一共展示了Basic::copyr方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: copy
/**
* copy $path to webmodulePublicDir/$path
*/
protected function copy($path)
{
$dest = Environment::getVariable('webtempDir') . '/' . static::ID . '/' . $path;
$src = $this->buildSrcPath() . $path;
if (!file_exists($dest)) {
if (file_exists($src)) {
Basic::copyr($src, $dest);
} else {
throw new ArgumentOutOfRangeException("Source path '{$src}' does NOT exist");
}
}
}
示例2: beforeRender
protected function beforeRender()
{
parent::beforeRender();
//copy assets to webtemp
$relPath = "/webtemp/acl";
$src = __DIR__ . "/../../assets";
$dest = WWW_DIR . $relPath;
if (!file_exists($dest)) {
if (file_exists($src)) {
Basic::copyr($src, $dest);
} else {
throw new ArgumentOutOfRangeException("Source path '{$src}' does NOT exist");
}
}
$this->template->assetsBasePath = Environment::getVariable('basePath') . $relPath;
$this->template->current = $this->getPresenter()->getName();
}
示例3: copy
/**
* copy $path to webmodulePublicDir/$path
* @param string
* @param bool is copied file mandatory?
*/
protected function copy($path, $need = true)
{
$dest = Basic::addLastSlash(self::$webloaderDestPath) . $path;
$src = Basic::addLastSlash(self::$webloaderSrcPath) . $path;
if (!file_exists($dest)) {
if (file_exists($src)) {
Basic::copyr($src, $dest);
} elseif ($need) {
throw new ArgumentOutOfRangeException("Source path '{$src}' does NOT exist");
}
}
}