MediaWiki  master
CodeContentHandler Class Reference

Content handler for code content such as CSS, JavaScript, JSON, etc. More...

Inheritance diagram for CodeContentHandler:
Collaboration diagram for CodeContentHandler:

Public Member Functions

 getFieldsForSearchIndex (SearchEngine $engine)
 
 getPageLanguage (Title $title, Content $content=null)
 Returns the english language, because code is english, and should be handled as such. More...
 
 getPageViewLanguage (Title $title, Content $content=null)
 Returns the english language, because code is english, and should be handled as such. 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 code content such as CSS, JavaScript, JSON, etc.

Since
1.24

Definition at line 29 of file CodeContentHandler.php.

Member Function Documentation

CodeContentHandler::getContentClass ( )
protected
Returns
string
Exceptions
MWException

Definition at line 63 of file CodeContentHandler.php.

CodeContentHandler::getFieldsForSearchIndex ( SearchEngine  $engine)
Parameters
SearchEngine$engine
Returns
array

Definition at line 71 of file CodeContentHandler.php.

CodeContentHandler::getPageLanguage ( Title  $title,
Content  $content = null 
)

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

Parameters
Title$title
Content$content
Returns
Language Return of wfGetLangObj( 'en' )
See Also
ContentHandler::getPageLanguage()

Definition at line 41 of file CodeContentHandler.php.

References wfGetLangObj().

CodeContentHandler::getPageViewLanguage ( Title  $title,
Content  $content = null 
)

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

Parameters
Title$title
Content$content
Returns
Language Return of wfGetLangObj( 'en' )
See Also
ContentHandler::getPageViewLanguage()

Definition at line 55 of file CodeContentHandler.php.

References wfGetLangObj().


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