MediaWiki
REL1_19
|
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) | |
Return the height of the image. | |
getImageSize ($filename) | |
Get an image size array like that returned by getImageSize(), or false if it can't be determined. | |
getMetadata () | |
Get handler-specific metadata Overridden by LocalFile, UnregisteredLocalFile STUB. | |
getMimeType () | |
Returns the mime type of the file. | |
getSize () | |
Return the size of the image file, in bytes Overridden by LocalFile, UnregisteredLocalFile STUB. | |
getURL () | |
getWidth ($page=1) | |
Return the width of the image. | |
Static Public Member Functions | |
static | newFromPath ($path, $mime) |
static | newFromTitle ($title, $repo) |
Public Attributes | |
$dims | |
$handler | |
$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 21 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|false |
$repo | FileRepo |
$path | string |
$mime | string |
Definition at line 57 of file UnregisteredLocalFile.php.
References $mime, $path, File\$repo, $title, File\assertRepoDefined(), and File\normalizeTitle().
UnregisteredLocalFile::cachePageDimensions | ( | $ | page = 1 | ) | [private] |
Definition at line 82 of file UnregisteredLocalFile.php.
References $page, and File\getHandler().
Referenced by getHeight(), and getWidth().
UnregisteredLocalFile::getHeight | ( | $ | page = 1 | ) |
Return the height of the image.
Returns false if the height is unknown or undefined
STUB Overridden by LocalFile, UnregisteredLocalFile
$page | int |
Reimplemented from File.
Definition at line 97 of file UnregisteredLocalFile.php.
References $page, and cachePageDimensions().
UnregisteredLocalFile::getImageSize | ( | $ | fileName | ) |
Get an image size array like that returned by getImageSize(), or false if it can't be determined.
$fileName | String: The filename |
Reimplemented from File.
Definition at line 110 of file UnregisteredLocalFile.php.
References File\getHandler(), and File\getLocalRefPath().
Get handler-specific metadata Overridden by LocalFile, UnregisteredLocalFile STUB.
Reimplemented from File.
Definition at line 117 of file UnregisteredLocalFile.php.
References File\getHandler(), and File\getLocalRefPath().
Returns the mime type of the file.
Overridden by LocalFile, UnregisteredLocalFile STUB
Reimplemented from File.
Definition at line 102 of file UnregisteredLocalFile.php.
References File\getLocalRefPath(), and MimeMagic\singleton().
Return the size of the image file, in bytes Overridden by LocalFile, UnregisteredLocalFile STUB.
Reimplemented from File.
Definition at line 137 of file UnregisteredLocalFile.php.
References File\assertRepoDefined().
Definition at line 128 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::getWidth | ( | $ | page = 1 | ) |
Return the width of the image.
Returns false if the width is unknown or undefined.
STUB Overridden by LocalFile, UnregisteredLocalFile
$page | int |
Reimplemented from File.
Definition at line 92 of file UnregisteredLocalFile.php.
References $page, and cachePageDimensions().
static UnregisteredLocalFile::newFromPath | ( | $ | path, |
$ | mime | ||
) | [static] |
$path | string Storage path |
$mime | string |
Definition at line 34 of file UnregisteredLocalFile.php.
static UnregisteredLocalFile::newFromTitle | ( | $ | title, |
$ | repo | ||
) | [static] |
$title | |
$repo |
Definition at line 43 of file UnregisteredLocalFile.php.
References File\$repo, $title, and false.
UnregisteredLocalFile::$dims |
Definition at line 22 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$handler |
Reimplemented from File.
Definition at line 27 of file UnregisteredLocalFile.php.
UnregisteredLocalFile::$mime |
Definition at line 22 of file UnregisteredLocalFile.php.
Referenced by __construct(), and newFromPath().
UnregisteredLocalFile::$path |
Reimplemented from File.
Definition at line 22 of file UnregisteredLocalFile.php.
Referenced by __construct(), UploadStashFile\__construct(), UploadStashFile\getThumbPath(), and newFromPath().
UnregisteredLocalFile::$title |
Reimplemented from File.
Definition at line 22 of file UnregisteredLocalFile.php.
Referenced by __construct(), and newFromTitle().