MediaWiki  REL1_22
JavaScriptContentHandler.php
Go to the documentation of this file.
00001 <?php
00030 class JavaScriptContentHandler extends TextContentHandler {
00031 
00032     public function __construct( $modelId = CONTENT_MODEL_JAVASCRIPT ) {
00033         parent::__construct( $modelId, array( CONTENT_FORMAT_JAVASCRIPT ) );
00034     }
00035 
00036     public function unserializeContent( $text, $format = null ) {
00037         $this->checkFormat( $format );
00038 
00039         return new JavaScriptContent( $text );
00040     }
00041 
00042     public function makeEmptyContent() {
00043         return new JavaScriptContent( '' );
00044     }
00045 
00053     public function getPageLanguage( Title $title, Content $content = null ) {
00054         return wfGetLangObj( 'en' );
00055     }
00056 
00064     public function getPageViewLanguage( Title $title, Content $content = null ) {
00065         return wfGetLangObj( 'en' );
00066     }
00067 }