Go to the documentation of this file.
86 ': not enough parameters, must specify title and repo, or a full path' );
119 if ( !isset( $this->dims[$page] ) ) {
123 $this->dims[$page] = $this->
handler->getPageDimensions( $this, $page );
126 return $this->dims[$page];
136 return $dim[
'width'];
146 return $dim[
'height'];
153 if ( !isset( $this->mime ) ) {
179 if ( !$gis || !isset( $gis[
'bits'] ) ) {
189 if ( !isset( $this->metadata ) ) {
191 $this->metadata =
false;
205 return $this->repo->getZoneUrl(
'public' ) .
'/' .
206 $this->repo->getHashPath( $this->
name ) . rawurlencode( $this->
name );
218 return $this->repo->getFileSize( $this->path );
static newFromTitle( $title, $repo)
FileRepo LocalRepo ForeignAPIRepo bool $repo
Some member variables can be lazy-initialised using __get().
static newFromPath( $path, $mime)
processing should stop and the error should be shown to the user * false
__construct( $title=false, $repo=false, $path=false, $mime=false)
Create an UnregisteredLocalFile based on a path or a (title,repo) pair.
getRootDirectory()
Get the public zone root storage directory of the repository.
A file object referring to either a standalone local file, or a file in a local repository with no da...
static normalizeTitle( $title, $exception=false)
Given a string or Title object return either a valid Title object with namespace NS_FILE or null.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check set to true or false to override the $wgMaxImageArea check result gives extension the possibility to transform it themselves set to a MediaTransformOutput the error message to be returned in an array you should do so by altering $wgNamespaceProtection and $wgNamespaceContentModels outside the handler
Implements some public methods and some protected utility functions which are required by multiple ch...
getLocalRefPath()
Get an FS copy or original of this file and return the path.
setLocalReference(FSFile $fsFile)
Optimize getLocalRefPath() by using an existing local reference.
bool string $metadata
Handler-specific metadata which will be saved in the img_metadata field.
static singleton()
Get an instance of this class.
getNameFromTitle(Title $title)
Get the name of a file from its title object.
FSFile bool $fsFile
False if undefined.
Class representing a non-directory file on the file system.
getHashPath( $name)
Get a relative path including trailing slash, e.g.
Represents a title within MediaWiki.
cachePageDimensions( $page=1)
assertRepoDefined()
Assert that $this->repo is set to a valid FileRepo instance.
string $name
The name of a file from its title object.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
getHandler()
Get a MediaHandler instance for this file.
array $dims
Dimension data.
the array() calling protocol came about after MediaWiki 1.4rc1.