MediaWiki  REL1_24
FakeDimensionFile.php
Go to the documentation of this file.
00001 <?php
00002 
00006 class FakeDimensionFile extends File {
00007     public $mustRender = false;
00008 
00009     public function __construct( $dimensions ) {
00010         parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
00011             new NullRepo( null ) );
00012 
00013         $this->dimensions = $dimensions;
00014     }
00015 
00016     public function getWidth( $page = 1 ) {
00017         return $this->dimensions[0];
00018     }
00019 
00020     public function getHeight( $page = 1 ) {
00021         return $this->dimensions[1];
00022     }
00023 
00024     public function mustRender() {
00025         return $this->mustRender;
00026     }
00027 
00028     public function getPath() {
00029         return '';
00030     }
00031 }