本文整理汇总了PHP中FileBackendGroup::get方法的典型用法代码示例。如果您正苦于以下问题:PHP FileBackendGroup::get方法的具体用法?PHP FileBackendGroup::get怎么用?PHP FileBackendGroup::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileBackendGroup
的用法示例。
在下文中一共展示了FileBackendGroup::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: batchFetchFromURLs
/**
* Fetch data from given external store URLs.
* The URL returned is of the form of the form mwstore://backend/container/wiki/id
*
* @param array $urls An array of external store URLs
* @return array A map from url to stored content. Failed results are not represented.
*/
public function batchFetchFromURLs( array $urls ) {
$pathsByBackend = array();
foreach ( $urls as $url ) {
$be = FileBackendGroup::singleton()->backendFromPath( $url );
if ( $be instanceof FileBackend ) {
$pathsByBackend[$be->getName()][] = $url;
}
}
$blobs = array();
foreach ( $pathsByBackend as $backendName => $paths ) {
$be = FileBackendGroup::get( $backendName );
$blobs = $blobs + $be->getFileContentsMulti( array( 'srcs' => $paths ) );
}
return $blobs;
}