MediaWiki  REL1_23
WikitextContentHandler Class Reference

Content handler for wiki text pages. More...

Inheritance diagram for WikitextContentHandler:
Collaboration diagram for WikitextContentHandler:

List of all members.

Public Member Functions

 __construct ($modelId=CONTENT_MODEL_WIKITEXT)
 isParserCacheSupported ()
 Returns true, because wikitext supports caching using the ParserCache mechanism.
 makeEmptyContent ()
 makeRedirectContent (Title $destination, $text= '')
 Returns a WikitextContent object representing a redirect to the given destination page.
 supportsRedirects ()
 Returns true because wikitext supports redirects.
 supportsSections ()
 Returns true because wikitext supports sections.
 unserializeContent ($text, $format=null)
 Unserializes a Content object of the type supported by this ContentHandler.

Detailed Description

Content handler for wiki text pages.

Definition at line 31 of file WikitextContentHandler.php.


Constructor & Destructor Documentation

Definition at line 33 of file WikitextContentHandler.php.

References array().


Member Function Documentation

Returns true, because wikitext supports caching using the ParserCache mechanism.

Since:
1.21
Returns:
bool Always true.
See also:
ContentHandler::isParserCacheSupported

Reimplemented from ContentHandler.

Definition at line 117 of file WikitextContentHandler.php.

Returns:
Content A new WikitextContent object with empty text.
See also:
ContentHandler::makeEmptyContent

Reimplemented from TextContentHandler.

Definition at line 48 of file WikitextContentHandler.php.

WikitextContentHandler::makeRedirectContent ( Title destination,
text = '' 
)

Returns a WikitextContent object representing a redirect to the given destination page.

Parameters:
Title$destinationThe page to redirect to.
string$textText to include in the redirect, if possible.
Returns:
Content
See also:
ContentHandler::makeRedirectContent

Reimplemented from ContentHandler.

Definition at line 62 of file WikitextContentHandler.php.

References Language\fetchLanguageName(), MagicWord\get(), Title\getFullText(), Title\getInterwiki(), and Title\getNamespace().

Returns true because wikitext supports redirects.

Returns:
bool Always true.
See also:
ContentHandler::supportsRedirects

Reimplemented from ContentHandler.

Definition at line 92 of file WikitextContentHandler.php.

Returns true because wikitext supports sections.

Returns:
bool Always true.
See also:
ContentHandler::supportsSections

Reimplemented from ContentHandler.

Definition at line 103 of file WikitextContentHandler.php.

WikitextContentHandler::unserializeContent ( text,
format = null 
)

Unserializes a Content object of the type supported by this ContentHandler.

Since:
1.21
Parameters:
string$textSerialized form of the content
string$formatThe format used for serialization
Returns:
Content The TextContent object wrapping $text

Reimplemented from TextContentHandler.

Definition at line 37 of file WikitextContentHandler.php.

References ContentHandler\checkFormat().


The documentation for this class was generated from the following file: