3 * JSON Schema Content Handler
7 * @author Ori Livneh <ori@wikimedia.org>
8 * @author Kunal Mehta <legoktm@gmail.com>
14 class JSONContentHandler
extends TextContentHandler
{
16 public function __construct( $modelId = CONTENT_MODEL_JSON
) {
17 parent
::__construct( $modelId, array( CONTENT_FORMAT_JSON
) );
23 protected function getContentClass() {
28 * Returns the english language, because JSON is english, and should be handled as such.
31 * @param Content|null $content
33 * @return Language Return of wfGetLangObj( 'en' )
35 * @see ContentHandler::getPageLanguage()
37 public function getPageLanguage( Title
$title, Content
$content = null ) {
38 return wfGetLangObj( 'en' );
42 * Returns the english language, because JSON is english, and should be handled as such.
45 * @param Content|null $content
47 * @return Language Return of wfGetLangObj( 'en' )
49 * @see ContentHandler::getPageLanguage()
51 public function getPageViewLanguage( Title
$title, Content
$content = null ) {
52 return wfGetLangObj( 'en' );