本文整理汇总了PHP中LocalRepo::getBackend方法的典型用法代码示例。如果您正苦于以下问题:PHP LocalRepo::getBackend方法的具体用法?PHP LocalRepo::getBackend怎么用?PHP LocalRepo::getBackend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LocalRepo
的用法示例。
在下文中一共展示了LocalRepo::getBackend方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getThumbnails
/**
* Get all thumbnail names previously generated for this file
* @param string|bool $archiveName Name of an archive file, default false
* @return array first element is the base dir, then files in that base dir.
*/
function getThumbnails($archiveName = false)
{
if ($archiveName) {
$dir = $this->getArchiveThumbPath($archiveName);
} else {
$dir = $this->getThumbPath();
}
$backend = $this->repo->getBackend();
$files = array($dir);
$iterator = $backend->getFileList(array('dir' => $dir));
foreach ($iterator as $file) {
$files[] = $file;
}
return $files;
}
示例2: getThumbnails
/**
* Get all thumbnail names previously generated for this file
* @param string|bool $archiveName Name of an archive file, default false
* @return array first element is the base dir, then files in that base dir.
*/
function getThumbnails( $archiveName = false ) {
if ( $archiveName ) {
$dir = $this->getArchiveThumbPath( $archiveName );
} else {
$dir = $this->getThumbPath();
}
$backend = $this->repo->getBackend();
$files = array( $dir );
try {
$iterator = $backend->getFileList( array( 'dir' => $dir ) );
foreach ( $iterator as $file ) {
$files[] = $file;
}
} catch ( FileBackendError $e ) {} // suppress (bug 54674)
return $files;
}