MediaWiki  1.23.6
FakeDimensionFile.php
Go to the documentation of this file.
1 <?php
2 
3 class FakeDimensionFile extends File {
4  public $mustRender = false;
5 
6  public function __construct( $dimensions ) {
7  parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
8  new NullRepo( null ) );
9 
10  $this->dimensions = $dimensions;
11  }
12 
13  public function getWidth( $page = 1 ) {
14  return $this->dimensions[0];
15  }
16 
17  public function getHeight( $page = 1 ) {
18  return $this->dimensions[1];
19  }
20 
21  public function mustRender() {
22  return $this->mustRender;
23  }
24 
25  public function getPath() {
26  return '';
27  }
28 }
Title\makeTitle
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
NullRepo
File repository with no files, for performance testing.
Definition: NullRepo.php:28
NS_FILE
const NS_FILE
Definition: Defines.php:85
File
Implements some public methods and some protected utility functions which are required by multiple ch...
Definition: File.php:50
FakeDimensionFile
Definition: FakeDimensionFile.php:3
FakeDimensionFile\getWidth
getWidth( $page=1)
Return the width of the image.
Definition: FakeDimensionFile.php:13
FakeDimensionFile\$mustRender
$mustRender
Definition: FakeDimensionFile.php:4
FakeDimensionFile\getHeight
getHeight( $page=1)
Return the height of the image.
Definition: FakeDimensionFile.php:17
FakeDimensionFile\getPath
getPath()
Return the storage path to the file.
Definition: FakeDimensionFile.php:25
FakeDimensionFile\__construct
__construct( $dimensions)
Definition: FakeDimensionFile.php:6
FakeDimensionFile\mustRender
mustRender()
Return true if the file is of a type that can't be directly rendered by typical browsers and needs to...
Definition: FakeDimensionFile.php:21