54 if ( $this->page === false ) {
55 $this->page = $this->pageLookup->getExistingPageByText(
66 if ( $this->file === false ) {
67 $page = $this->getPage();
69 $this->repoGroup->findFile( $page, [
'private' => $this->
getAuthority() ] ) ?:
null;
80 $page = $this->getPage();
84 MessageValue::new(
'rest-nonexistent-title' )->plaintextParams(
$title ),
89 if ( !$this->
getAuthority()->authorizeRead(
'read', $page ) ) {
91 MessageValue::new(
'rest-permission-denied-title' )->plaintextParams(
$title ),
97 if ( !$fileObj || !$fileObj->exists() ) {
99 MessageValue::new(
'rest-cannot-load-file' )->plaintextParams(
$title ),
104 $response = $this->getResponse( $fileObj );
105 return $this->getResponseFactory()->createJson( $response );
113 list( $maxWidth, $maxHeight ) = self::getImageLimitsFromOption(
116 list( $maxThumbWidth, $maxThumbHeight ) = self::getImageLimitsFromOption(
121 'maxWidth' => $maxWidth,
122 'maxHeight' => $maxHeight
125 'maxWidth' => $maxThumbWidth,
126 'maxHeight' => $maxThumbHeight
140 self::PARAM_SOURCE =>
'path',
141 ParamValidator::PARAM_TYPE =>
'string',
142 ParamValidator::PARAM_REQUIRED =>
true,
157 return '"' .
$file->getSha1() .
'"';
170 return $file->getTimestamp();
getFile()
Get the file for this page, if one exists.
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
Implements some public methods and some protected utility functions which are required by multiple ch...
exists()
Returns true if file exists in the repository.
Prioritized list of file repositories.
Service interface for looking up infermation about wiki pages.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.