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