return $image;
}
+ /**
+ * @param $inputItems array
+ * @return array
+ */
function findFiles( $inputItems ) {
if ( !$this->reposInitialised ) {
$this->initialiseRepos();
/**
* Interface for FileRepo::checkRedirect()
+ * @param $title Title
* @return bool
*/
function checkRedirect( Title $title ) {
foreach ( $this->foreignRepos as $repo ) {
$result = array_merge( $result, $repo->findBySha1( $hash ) );
}
+ usort( $result, 'File::compare' );
return $result;
}
/**
* Get the repo instance with a given key.
+ * @param $index string|int
* @return bool|LocalRepo
*/
function getRepo( $index ) {
return false;
}
}
+
/**
* Get the repo instance by its name
+ * @param $name string
* @return bool
*/
function getRepoByName( $name ) {
$this->initialiseRepos();
}
foreach ( $this->foreignRepos as $repo ) {
- if ( $repo->name == $name)
+ if ( $repo->name == $name ) {
return $repo;
+ }
}
return false;
}
/**
* Split a virtual URL into repo, zone and rel parts
* @param $url string
+ * @throws MWException
* @return array containing repo, zone and rel
*/
function splitVirtualUrl( $url ) {
return $bits;
}
+ /**
+ * @param $fileName string
+ * @return array
+ */
function getFileProps( $fileName ) {
if ( FileRepo::isVirtualUrl( $fileName ) ) {
list( $repoName, /* $zone */, /* $rel */ ) = $this->splitVirtualUrl( $fileName );