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