MediaWiki
1.28.0
|
Public Member Functions | |
__construct ($data) | |
copy () | |
Return a copy of this Content object. More... | |
getNativeData () | |
Returns native represenation of the data. More... | |
getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true) | |
getSize () | |
returns the content's nominal size in bogo-bytes. More... | |
getTextForSearchIndex () | |
getTextForSummary ($maxlength=250) | |
Returns a textual representation of the content suitable for use in edit summaries and log messages. More... | |
getWikitextForTransclusion () | |
isCountable ($hasLinks=null) | |
Returns true if this content is countable as a "real" wiki page, provided that it's also in a countable location (e.g. More... | |
serialize ($format=null) | |
Convenience method for serializing this Content object. More... | |
Public Member Functions inherited from AbstractContent | |
__construct ($modelId=null) | |
addSectionHeader ($header) | |
convert ($toModel, $lossy= '') | |
This base implementation calls the hook ConvertContent to enable custom conversions. More... | |
equals (Content $that=null) | |
getContentHandler () | |
getDefaultFormat () | |
getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null) | |
getModel () | |
getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true) | |
Returns a ParserOutput object containing information derived from this content. More... | |
getRedirectChain () | |
getRedirectTarget () | |
Subclasses that implement redirects should override this. More... | |
getSecondaryDataUpdates (Title $title, Content $old=null, $recursive=true, ParserOutput $parserOutput=null) | |
Returns a list of DataUpdate objects for recording information about this Content in some secondary data store. More... | |
getSection ($sectionId) | |
getSupportedFormats () | |
getUltimateRedirectTarget () | |
isEmpty () | |
isRedirect () | |
isSupportedFormat ($format) | |
isValid () | |
Subclasses may override this to implement (light weight) validation. More... | |
matchMagicWord (MagicWord $word) | |
This default implementation always returns false. More... | |
preloadTransform (Title $title, ParserOptions $popts, $params=[]) | |
prepareSave (WikiPage $page, $flags, $parentRevId, User $user) | |
preSaveTransform (Title $title, User $user, ParserOptions $popts) | |
replaceSection ($sectionId, Content $with, $sectionTitle= '') | |
serialize ($format=null) | |
updateRedirect (Title $target) | |
This default implementation always returns $this. More... | |
Protected Member Functions | |
fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) | |
Protected Member Functions inherited from AbstractContent | |
checkFormat ($format) | |
checkModelID ($modelId) | |
fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) | |
Fills the provided ParserOutput with information derived from the content. More... | |
Additional Inherited Members | |
Protected Attributes inherited from AbstractContent | |
$model_id | |
Name of the content model this Content object represents. More... | |
Definition at line 3 of file DummyContentForTesting.php.
DummyContentForTesting::__construct | ( | $data | ) |
Definition at line 5 of file DummyContentForTesting.php.
References data.
DummyContentForTesting::copy | ( | ) |
Return a copy of this Content object.
The following must be true for the object returned if $copy = $original->copy()
If and only if the Content object is imutable, the copy() method can and should return $this. That is, $copy === $original may be true, but only for imutable content objects.
Implements Content.
Definition at line 77 of file DummyContentForTesting.php.
|
protected |
Title | $title | Context title for parsing |
int | null | $revId | Revision ID (for {{REVISIONID}}) |
ParserOptions | $options | Parser options |
bool | $generateHtml | Whether or not to generate HTML |
ParserOutput | &$output | The output object to fill (reference). |
Definition at line 117 of file DummyContentForTesting.php.
References getNativeData().
DummyContentForTesting::getNativeData | ( | ) |
Returns native represenation of the data.
Interpretation depends on the data model used, as given by getDataModel().
Implements Content.
Definition at line 50 of file DummyContentForTesting.php.
Referenced by fillParserOutput(), and getParserOutput().
DummyContentForTesting::getParserOutput | ( | Title | $title, |
$revId = null , |
|||
ParserOptions | $options = null , |
||
$generateHtml = true |
|||
) |
Title | $title | |
int | $revId | Unused. |
null | ParserOptions | $options | |
bool | $generateHtml | Whether to generate Html (default: true). If false, the result of calling getText() on the ParserOutput object returned by this method is undefined. |
Implements Content.
Definition at line 102 of file DummyContentForTesting.php.
References getNativeData().
DummyContentForTesting::getSize | ( | ) |
returns the content's nominal size in bogo-bytes.
Implements Content.
Definition at line 59 of file DummyContentForTesting.php.
References data.
DummyContentForTesting::getTextForSearchIndex | ( | ) |
Implements Content.
Definition at line 20 of file DummyContentForTesting.php.
DummyContentForTesting::getTextForSummary | ( | $maxlength = 250 | ) |
Returns a textual representation of the content suitable for use in edit summaries and log messages.
int | $maxlength | Maximum length of the summary text. |
Implements Content.
Definition at line 39 of file DummyContentForTesting.php.
DummyContentForTesting::getWikitextForTransclusion | ( | ) |
Implements Content.
Definition at line 28 of file DummyContentForTesting.php.
DummyContentForTesting::isCountable | ( | $hasLinks = null | ) |
Returns true if this content is countable as a "real" wiki page, provided that it's also in a countable location (e.g.
a current revision in the main namespace).
bool | null | $hasLinks | If it is known whether this content contains links, provide this information here, to avoid redundant parsing to find out. |
Implements Content.
Definition at line 89 of file DummyContentForTesting.php.
DummyContentForTesting::serialize | ( | $format = null | ) |
Convenience method for serializing this Content object.
Shorthand for $this->getContentHandler()->serializeContent( $this, $format )
string | $format | The desired serialization format, or null for the default format. |
Implements Content.
Definition at line 11 of file DummyContentForTesting.php.
References data.