MediaWiki REL1_32
DummyNonTextContent.php
Go to the documentation of this file.
1<?php
2
4
5 public function __construct( $data ) {
6 parent::__construct( "testing-nontext" );
7
8 $this->data = $data;
9 }
10
11 public function serialize( $format = null ) {
12 return serialize( $this->data );
13 }
14
20 public function getTextForSearchIndex() {
21 return '';
22 }
23
28 public function getWikitextForTransclusion() {
29 return false;
30 }
31
39 public function getTextForSummary( $maxlength = 250 ) {
40 return '';
41 }
42
50 public function getNativeData() {
51 return $this->data;
52 }
53
59 public function getSize() {
60 return strlen( $this->data );
61 }
62
77 public function copy() {
78 return $this;
79 }
80
89 public function isCountable( $hasLinks = null ) {
90 return false;
91 }
92
102 public function getParserOutput( Title $title, $revId = null,
103 ParserOptions $options = null, $generateHtml = true
104 ) {
105 return new ParserOutput( $this->getNativeData() );
106 }
107
117 protected function fillParserOutput( Title $title, $revId,
118 ParserOptions $options, $generateHtml, ParserOutput &$output ) {
119 $output = new ParserOutput( $this->getNativeData() );
120 }
121}
serialize()
Base implementation for content objects.
isCountable( $hasLinks=null)
Returns true if this content is countable as a "real" wiki page, provided that it's also in a countab...
fillParserOutput(Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output)
getTextForSummary( $maxlength=250)
Returns a textual representation of the content suitable for use in edit summaries and log messages.
getSize()
returns the content's nominal size in bogo-bytes.
copy()
Return a copy of this Content object.
getNativeData()
Returns native represenation of the data.
getParserOutput(Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
Set options of the Parser.
Represents a title within MediaWiki.
Definition Title.php:39
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition hooks.txt:2050
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place $output
Definition hooks.txt:2317