MediaWiki REL1_31
DummyNonTextContentHandler.php
Go to the documentation of this file.
1<?php
2
4
5 public function __construct( $dataModel ) {
6 parent::__construct( $dataModel, [ "testing-nontext" ] );
7 }
8
17 public function serializeContent( Content $content, $format = null ) {
18 return $content->serialize();
19 }
20
29 public function unserializeContent( $blob, $format = null ) {
30 $d = unserialize( $blob );
31
32 return new DummyNonTextContent( $d );
33 }
34
39 public function makeEmptyContent() {
40 return new DummyNonTextContent( '' );
41 }
42
43 public function supportsDirectApiEditing() {
44 return true;
45 }
46
47}
unserialize( $serialized)
makeEmptyContent()
Creates an empty Content object of the type supported by this ContentHandler.
supportsDirectApiEditing()
Whether or not this content model supports direct editing via ApiEditPage.
serializeContent(Content $content, $format=null)
Base interface for content objects.
Definition Content.php:34
serialize( $format=null)
Convenience method for serializing this Content object.