MediaWiki fundraising/REL1_35
|
Content object implementation representing unknown content. More...
Public Member Functions | |
__construct ( $data, $model_id) | |
convert ( $toModel, $lossy='') | |
copy () | |
getData () | |
getNativeData () | |
getSize () | |
Returns the data size in bytes. | |
getTextForSearchIndex () | |
Returns an empty string. | |
getTextForSummary ( $maxlength=250) | |
Returns an empty string. | |
getWikitextForTransclusion () | |
isCountable ( $hasLinks=null) | |
Returns false. | |
Public Member Functions inherited from AbstractContent | |
__construct ( $modelId=null) | |
Stable to call. | |
addSectionHeader ( $header) | |
Stable to override. | |
equals (Content $that=null) | |
Decides whether two Content objects are equal. | |
getContentHandler () | |
getDefaultFormat () | |
getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null) | |
Stable to override. | |
getModel () | |
getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true) | |
Returns a ParserOutput object containing information derived from this content. | |
getRedirectChain () | |
getRedirectTarget () | |
Subclasses that implement redirects should override this. | |
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. | |
getSection ( $sectionId) | |
Stable to override. | |
getSupportedFormats () | |
getUltimateRedirectTarget () | |
isEmpty () | |
Stable to override. | |
isRedirect () | |
isSupportedFormat ( $format) | |
isValid () | |
Subclasses may override this to implement (light weight) validation. | |
matchMagicWord (MagicWord $word) | |
This default implementation always returns false. | |
preloadTransform (Title $title, ParserOptions $popts, $params=[]) | |
Stable to override. | |
prepareSave (WikiPage $page, $flags, $parentRevId, User $user) | |
Stable to override. | |
preSaveTransform (Title $title, User $user, ParserOptions $popts) | |
Stable to override. | |
replaceSection ( $sectionId, Content $with, $sectionTitle='') | |
Stable to override. | |
serialize ( $format=null) | |
Stable to override. | |
updateRedirect (Title $target) | |
This default implementation always returns $this. | |
Protected Member Functions | |
equalsInternal (Content $that) | |
Checks whether $that is logically equal to this Content object. | |
fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) | |
Fills the ParserOutput with an error message. | |
Protected Member Functions inherited from AbstractContent | |
checkFormat ( $format) | |
checkModelID ( $modelId) | |
getContentHandlerFactory () | |
Private Attributes | |
string | $data |
Additional Inherited Members | |
Protected Attributes inherited from AbstractContent | |
string | $model_id |
Name of the content model this Content object represents. | |
Content object implementation representing unknown content.
This can be used to handle content for which no ContentHandler exists on the system, perhaps because the extension that provided it has been removed.
UnknownContent instances are immutable.
Definition at line 38 of file UnknownContent.php.
UnknownContent::__construct | ( | $data, | |
$model_id ) |
string | $data | |
string | $model_id | The model ID to handle |
Definition at line 47 of file UnknownContent.php.
References $data, and AbstractContent\$model_id.
UnknownContent::convert | ( | $toModel, | |
$lossy = '' ) |
string | $toModel | |
string | $lossy |
Reimplemented from AbstractContent.
Definition at line 144 of file UnknownContent.php.
UnknownContent::copy | ( | ) |
|
protected |
Checks whether $that is logically equal to this Content object.
This method can be overwritten by subclasses that need to implement custom equality checks.
This default implementation checks whether the serializations of $this and $that are the same: $this->serialize() === $that->serialize()
Implementors can assume that $that is an instance of the same class as the present Content object, as long as equalsInternal() is only called by the standard implementation of equals().
Stable to override
Content | $that |
Reimplemented from AbstractContent.
Definition at line 148 of file UnknownContent.php.
References getData().
|
protected |
Fills the ParserOutput with an error message.
Title | $title | |
int | $revId | |
ParserOptions | $options | |
bool | $generateHtml | |
ParserOutput | &$output |
Reimplemented from AbstractContent.
Definition at line 131 of file UnknownContent.php.
References AbstractContent\getModel(), ParserOutput\setText(), and wfMessage().
UnknownContent::getData | ( | ) |
Definition at line 103 of file UnknownContent.php.
References $data.
Referenced by equalsInternal(), and getNativeData().
UnknownContent::getNativeData | ( | ) |
Implements Content.
Definition at line 96 of file UnknownContent.php.
References getData().
UnknownContent::getSize | ( | ) |
Returns the data size in bytes.
Implements Content.
Definition at line 77 of file UnknownContent.php.
UnknownContent::getTextForSearchIndex | ( | ) |
Returns an empty string.
Implements Content.
Definition at line 112 of file UnknownContent.php.
UnknownContent::getTextForSummary | ( | $maxlength = 250 | ) |
Returns an empty string.
int | $maxlength |
Implements Content.
Definition at line 68 of file UnknownContent.php.
UnknownContent::getWikitextForTransclusion | ( | ) |
UnknownContent::isCountable | ( | $hasLinks = null | ) |
Returns false.
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 UnknownContent.php.
|
private |
Definition at line 41 of file UnknownContent.php.
Referenced by __construct(), and getData().