MediaWiki fundraising/REL1_35
PreparedEdit.php
Go to the documentation of this file.
1<?php
22
23use Content;
25use ParserOutput;
26use RuntimeException;
27
41 public $timestamp;
42
48 public $revid;
49
56
62 public $format;
63
69 public $popts;
70
77
84
91
98
102 public function getOutput() {
103 if ( !$this->canonicalOutput ) {
104 $this->canonicalOutput = call_user_func( $this->parserOutputCallback );
105 }
106
108 }
109
117 public function __get( $name ) {
118 if ( $name === 'output' ) {
119 return $this->getOutput();
120 }
121
122 throw new RuntimeException( "Undefined field $name." );
123 }
124}
Represents information returned by WikiPage::prepareContentForEdit()
Content null $oldContent
Current content of the page, if any.
int null $revid
Revision ID.
ParserOptions $popts
Parser options used to get parser output.
__get( $name)
Fetch the ParserOutput via a lazy-loaded callback (for backwards compatibility).
Content $newContent
Content that is being saved (before PST)
ParserOutput null $canonicalOutput
Parser output.
string $format
Content format.
callable $parserOutputCallback
Lazy-loading callback to get canonical ParserOutput object.
Content null $pstContent
Content after going through pre-save transform.
string $timestamp
Time this prepared edit was made.
Set options of the Parser.
Base interface for content objects.
Definition Content.php:35