MediaWiki  REL1_19
UnregisteredLocalFile Class Reference

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...

Inheritance diagram for UnregisteredLocalFile:
Collaboration diagram for UnregisteredLocalFile:

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

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.

Exceptions:
MWException
Parameters:
$titleTitle|false
$repoFileRepo
$pathstring
$mimestring

Definition at line 57 of file UnregisteredLocalFile.php.

References $mime, $path, File\$repo, $title, File\assertRepoDefined(), and File\normalizeTitle().

Here is the call graph for this function:


Member Function Documentation

UnregisteredLocalFile::cachePageDimensions ( page = 1) [private]

Definition at line 82 of file UnregisteredLocalFile.php.

References $page, and File\getHandler().

Referenced by getHeight(), and getWidth().

Here is the call graph for this function:

Here is the caller graph for this function:

Return the height of the image.

Returns false if the height is unknown or undefined

STUB Overridden by LocalFile, UnregisteredLocalFile

Parameters:
$pageint
Returns:
false|number

Reimplemented from File.

Definition at line 97 of file UnregisteredLocalFile.php.

References $page, and cachePageDimensions().

Here is the call graph for this function:

Get an image size array like that returned by getImageSize(), or false if it can't be determined.

Parameters:
$fileNameString: The filename
Returns:
Array

Reimplemented from File.

Definition at line 110 of file UnregisteredLocalFile.php.

References File\getHandler(), and File\getLocalRefPath().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Returns the mime type of the file.

Overridden by LocalFile, UnregisteredLocalFile STUB

Returns:
string

Reimplemented from File.

Definition at line 102 of file UnregisteredLocalFile.php.

References File\getLocalRefPath(), and MimeMagic\singleton().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Return the width of the image.

Returns false if the width is unknown or undefined.

STUB Overridden by LocalFile, UnregisteredLocalFile

Parameters:
$pageint
Returns:
number

Reimplemented from File.

Definition at line 92 of file UnregisteredLocalFile.php.

References $page, and cachePageDimensions().

Here is the call graph for this function:

static UnregisteredLocalFile::newFromPath ( path,
mime 
) [static]
Parameters:
$pathstring Storage path
$mimestring
Returns:
UnregisteredLocalFile

Definition at line 34 of file UnregisteredLocalFile.php.

References $mime, and $path.

static UnregisteredLocalFile::newFromTitle ( title,
repo 
) [static]
Parameters:
$title
$repo
Returns:
UnregisteredLocalFile

Definition at line 43 of file UnregisteredLocalFile.php.

References File\$repo, $title, and false.


Member Data Documentation

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().


The documentation for this class was generated from the following file: