MediaWiki
REL1_33
JsonContentHandler.php
Go to the documentation of this file.
1
<?php
30
class
JsonContentHandler
extends
CodeContentHandler
{
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
}
CodeContentHandler
Content handler for code content such as CSS, JavaScript, JSON, etc.
Definition
CodeContentHandler.php:29
JsonContentHandler
Content handler for JSON.
Definition
JsonContentHandler.php:30
JsonContentHandler\getContentClass
getContentClass()
Definition
JsonContentHandler.php:39
JsonContentHandler\__construct
__construct( $modelId=CONTENT_MODEL_JSON)
Definition
JsonContentHandler.php:32
JsonContentHandler\makeEmptyContent
makeEmptyContent()
Creates an empty TextContent object.
Definition
JsonContentHandler.php:43
CONTENT_FORMAT_JSON
const CONTENT_FORMAT_JSON
Definition
Defines.php:271
CONTENT_MODEL_JSON
const CONTENT_MODEL_JSON
Definition
Defines.php:248
includes
content
JsonContentHandler.php
Generated on Mon Nov 25 2024 15:49:15 for MediaWiki by
1.10.0