Page MenuHomeWickedGov Phorge

FakeDimensionFile.php
No OneTemporary

Size
923 B
Referenced Files
None
Subscribers
None

FakeDimensionFile.php

<?php
use MediaWiki\FileRepo\File\File;
use MediaWiki\FileRepo\NullRepo;
use MediaWiki\Title\Title;
class FakeDimensionFile extends File {
/** @var bool */
public $mustRender = false;
/** @var string */
public $mime;
/** @var int[] */
public $dimensions;
public function __construct( array $dimensions, string $mime = 'unknown/unknown' ) {
parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
new NullRepo( null ) );
$this->dimensions = $dimensions;
$this->mime = $mime;
}
/** @inheritDoc */
public function getWidth( $page = 1 ) {
return $this->dimensions[0];
}
/** @inheritDoc */
public function getHeight( $page = 1 ) {
return $this->dimensions[1];
}
/** @inheritDoc */
public function mustRender() {
return $this->mustRender;
}
/** @inheritDoc */
public function getPath() {
return '';
}
/** @inheritDoc */
public function getMimeType() {
return $this->mime;
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Jul 3, 16:24 (6 h, 30 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7b/ae/46c0dc84a9e3253909abf278d912
Default Alt Text
FakeDimensionFile.php (923 B)

Event Timeline