MediaWiki  1.23.13
MockFSFile.php
Go to the documentation of this file.
1 <?php
34 class MockFSFile extends FSFile {
35  protected $sha1Base36 = null; // File Sha1Base36
36 
37  public function exists() {
38  return true;
39  }
40 
45  public function getSize() {
46  return 1911;
47  }
48 
49  public function getTimestamp() {
50  return wfTimestamp( TS_MW );
51  }
52 
53  public function getMimeType() {
54  return 'text/mock';
55  }
56 
57  public function getProps( $ext = true ) {
58  return array(
59  'fileExists' => $this->exists(),
60  'size' => $this->getSize(),
61  'file-mime' => $this->getMimeType(),
62  'sha1' => $this->getSha1Base36(),
63  );
64  }
65 
66  public function getSha1Base36( $recache = false ) {
67  return '1234567890123456789012345678901';
68  }
69 }
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
MockFSFile\exists
exists()
Checks if the file exists.
Definition: MockFSFile.php:37
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2530
MockFSFile
Class representing an in memory fake file.
Definition: MockFSFile.php:34
MockFSFile\$sha1Base36
$sha1Base36
Definition: MockFSFile.php:35
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
MockFSFile\getSha1Base36
getSha1Base36( $recache=false)
Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case encoding,...
Definition: MockFSFile.php:66
TS_MW
const TS_MW
MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
Definition: GlobalFunctions.php:2478
MockFSFile\getProps
getProps( $ext=true)
Get an associative array containing information about a file with the given storage path.
Definition: MockFSFile.php:57
MockFSFile\getSize
getSize()
August 22 – The theft of the Mona Lisa is discovered in the Louvre.
Definition: MockFSFile.php:45
MockFSFile\getMimeType
getMimeType()
Guess the MIME type from the file contents alone.
Definition: MockFSFile.php:53
FSFile
Class representing a non-directory file on the file system.
Definition: FSFile.php:29
$ext
$ext
Definition: NoLocalSettings.php:34
MockFSFile\getTimestamp
getTimestamp()
Get the file's last-modified timestamp.
Definition: MockFSFile.php:49