MediaWiki  master
JsonContentHandler.php
Go to the documentation of this file.
1 <?php
31 
32  public function __construct( $modelId = CONTENT_MODEL_JSON ) {
33  parent::__construct( $modelId, [ CONTENT_FORMAT_JSON ] );
34  }
35 
39  protected function getContentClass() {
40  return JsonContent::class;
41  }
42 
43  public function makeEmptyContent() {
44  $class = $this->getContentClass();
45  return new $class( '{}' );
46  }
47 }
Content handler for JSON.
__construct( $modelId=CONTENT_MODEL_JSON)
const CONTENT_MODEL_JSON
Definition: Defines.php:219
Content handler for code content such as CSS, JavaScript, JSON, etc.
const CONTENT_FORMAT_JSON
Definition: Defines.php:242