MediaWiki
REL1_22
|
A file object referring to either a standalone local file, or a file in a local repository with no database, for example an FileRepo repository. More...
Public Member Functions | |
__construct ($title=false, $repo=false, $path=false, $mime=false) | |
Create an UnregisteredLocalFile based on a path or a (title,repo) pair. | |
getHeight ($page=1) | |
getImageSize ($filename) | |
getMetadata () | |
getMimeType () | |
getSize () | |
getURL () | |
getWidth ($page=1) | |
setLocalReference (FSFile $fsFile) | |
Optimize getLocalRefPath() by using an existing local reference. | |
Static Public Member Functions | |
static | newFromPath ($path, $mime) |
static | newFromTitle ($title, $repo) |
Public Attributes | |
$dims | |
MediaHandler | $handler |
$metadata | |
$mime | |
$path | |
$title | |
Private Member Functions | |
cachePageDimensions ($page=1) |
A file object referring to either a standalone local file, or a file in a local repository with no database, for example an FileRepo repository.
Read-only.
TODO: Currently it doesn't really work in the repository role, there are lots of functions missing. It is used by the WebStore extension in the standalone role.
Definition at line 36 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::__construct | ( | $ | title = false , |
$ | repo = false , |
||
$ | path = false , |
||
$ | mime = false |
||
) |
Create an UnregisteredLocalFile based on a path or a (title,repo) pair.
A FileRepo object is not required here, unlike most other File classes.
MWException |
$title | Title|bool |
$repo | FileRepo|bool |
$path | string|bool |
$mime | string|bool |
Definition at line 71 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::cachePageDimensions | ( | $ | page = 1 | ) | [private] |
UnregisteredLocalFile::getHeight | ( | $ | page = 1 | ) |
$page | int |
Reimplemented from File.
Definition at line 123 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::getImageSize | ( | $ | filename | ) |
$filename | String |
Reimplemented from File.
Definition at line 143 of file UnregisteredLocalFile.php.
Reimplemented from File.
Definition at line 131 of file UnregisteredLocalFile.php.
Definition at line 167 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::getWidth | ( | $ | page = 1 | ) |
$page | int |
Reimplemented from File.
Definition at line 114 of file UnregisteredLocalFile.php.
static UnregisteredLocalFile::newFromPath | ( | $ | path, |
$ | mime | ||
) | [static] |
string | $path | Storage path |
$mime | string |
Definition at line 48 of file UnregisteredLocalFile.php.
static UnregisteredLocalFile::newFromTitle | ( | $ | title, |
$ | repo | ||
) | [static] |
$title | |
$repo |
Definition at line 57 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::setLocalReference | ( | FSFile $ | fsFile | ) |
Optimize getLocalRefPath() by using an existing local reference.
The file at the path of $fsFile should not be deleted (or at least not until the end of the request). This is mostly a performance hack.
$fsFile | FSFile |
Definition at line 192 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$dims |
Definition at line 37 of file UnregisteredLocalFile.php.
MediaHandler UnregisteredLocalFile::$handler |
Reimplemented from File.
Definition at line 41 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$metadata |
Definition at line 37 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$mime |
Definition at line 37 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$path |
Reimplemented from File.
Definition at line 37 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$title |
Reimplemented from File.
Definition at line 37 of file UnregisteredLocalFile.php.