MediaWiki  master
WikitextContentHandler Class Reference

Content handler for wiki text pages. More...

Inheritance diagram for WikitextContentHandler:
Collaboration diagram for WikitextContentHandler:

Public Member Functions

 __construct ($modelId=CONTENT_MODEL_WIKITEXT)
 
 getFieldsForSearchIndex (SearchEngine $engine)
 
 isParserCacheSupported ()
 Returns true, because wikitext supports caching using the ParserCache mechanism. More...
 
 makeRedirectContent (Title $destination, $text= '')
 Returns a WikitextContent object representing a redirect to the given destination page. More...
 
 supportsRedirects ()
 Returns true because wikitext supports redirects. More...
 
 supportsSections ()
 Returns true because wikitext supports sections. More...
 
- Public Member Functions inherited from TextContentHandler
 __construct ($modelId=CONTENT_MODEL_TEXT, $formats=[CONTENT_FORMAT_TEXT])
 
 getFieldsForSearchIndex (SearchEngine $engine)
 
 makeEmptyContent ()
 Creates an empty TextContent object. More...
 
 merge3 (Content $oldContent, Content $myContent, Content $yourContent)
 Attempts to merge differences between three versions. More...
 
 serializeContent (Content $content, $format=null)
 Returns the content's text as-is. More...
 
 supportsDirectEditing ()
 
 unserializeContent ($text, $format=null)
 Unserializes a Content object of the type supported by this ContentHandler. More...
 

Protected Member Functions

 getContentClass ()
 
- Protected Member Functions inherited from TextContentHandler
 getContentClass ()
 Returns the name of the associated Content class, to be used when creating new objects. More...
 

Detailed Description

Content handler for wiki text pages.

Definition at line 31 of file WikitextContentHandler.php.

Constructor & Destructor Documentation

WikitextContentHandler::__construct (   $modelId = CONTENT_MODEL_WIKITEXT)

Definition at line 33 of file WikitextContentHandler.php.

References CONTENT_FORMAT_WIKITEXT.

Member Function Documentation

WikitextContentHandler::getContentClass ( )
protected

Definition at line 37 of file WikitextContentHandler.php.

Referenced by makeRedirectContent().

WikitextContentHandler::isParserCacheSupported ( )

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

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

Definition at line 107 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

Definition at line 51 of file WikitextContentHandler.php.

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

WikitextContentHandler::supportsRedirects ( )

Returns true because wikitext supports redirects.

Returns
bool Always true.
See Also
ContentHandler::supportsRedirects

Definition at line 82 of file WikitextContentHandler.php.

WikitextContentHandler::supportsSections ( )

Returns true because wikitext supports sections.

Returns
bool Always true.
See Also
ContentHandler::supportsSections

Definition at line 93 of file WikitextContentHandler.php.


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