MediaWiki  REL1_22
JavaScriptContentHandler Class Reference

Content handler for JavaScript pages. More...

Inheritance diagram for JavaScriptContentHandler:
Collaboration diagram for JavaScriptContentHandler:

List of all members.

Public Member Functions

 __construct ($modelId=CONTENT_MODEL_JAVASCRIPT)
 getPageLanguage (Title $title, Content $content=null)
 Returns the english language, because JS is english, and should be handled as such.
 getPageViewLanguage (Title $title, Content $content=null)
 Returns the english language, because JS is english, and should be handled as such.
 makeEmptyContent ()
 Creates an empty TextContent object.
 unserializeContent ($text, $format=null)
 Unserializes a Content object of the type supported by this ContentHandler.

Detailed Description

Content handler for JavaScript pages.

Since:
1.21
Todo:
make ScriptContentHandler base class, do highlighting stuff there?

Definition at line 30 of file JavaScriptContentHandler.php.


Constructor & Destructor Documentation


Member Function Documentation

JavaScriptContentHandler::getPageLanguage ( Title title,
Content content = null 
)

Returns the english language, because JS is english, and should be handled as such.

Returns:
Language wfGetLangObj( 'en' )
See also:
ContentHandler::getPageLanguage()

Reimplemented from ContentHandler.

Definition at line 53 of file JavaScriptContentHandler.php.

References wfGetLangObj().

JavaScriptContentHandler::getPageViewLanguage ( Title title,
Content content = null 
)

Returns the english language, because JS is english, and should be handled as such.

Returns:
Language wfGetLangObj( 'en' )
See also:
ContentHandler::getPageViewLanguage()

Reimplemented from ContentHandler.

Definition at line 64 of file JavaScriptContentHandler.php.

References wfGetLangObj().

Creates an empty TextContent object.

Since:
1.21
Returns:
Content

Reimplemented from TextContentHandler.

Definition at line 42 of file JavaScriptContentHandler.php.

JavaScriptContentHandler::unserializeContent ( text,
format = null 
)

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

Since:
1.21
Parameters:
$textstring serialized form of the content
$formatnull|String the format used for serialization
Returns:
Content the TextContent object wrapping $text

Reimplemented from TextContentHandler.

Definition at line 36 of file JavaScriptContentHandler.php.

References ContentHandler\checkFormat().


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