MediaWiki  REL1_22
DummyContentForTesting Class Reference
Inheritance diagram for DummyContentForTesting:
Collaboration diagram for DummyContentForTesting:

List of all members.

Public Member Functions

 __construct ($data)
 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)
 getSize ()
 returns the content's nominal size in bogo-bytes.
 getTextForSearchIndex ()
 getTextForSummary ($maxlength=250)
 Returns a textual representation of the content suitable for use in edit summaries and log messages.
 getWikitextForTransclusion ()
 isCountable ($hasLinks=null)
 Returns true if this content is countable as a "real" wiki page, provided that it's also in a countable location (e.g.
 serialize ($format=null)

Detailed Description

Definition at line 350 of file ContentHandlerTest.php.


Constructor & Destructor Documentation

Parameters:
string | null$modelId
Since:
1.21

Reimplemented from AbstractContent.

Definition at line 352 of file ContentHandlerTest.php.

References data.


Member Function Documentation

Return a copy of this Content object.

The following must be true for the object returned if $copy = $original->copy()

* get_class($original) === get_class($copy) * $original->getModel() === $copy->getModel() * $original->equals( $copy )

If and only if the Content object is imutable, the copy() method can and should return $this. That is, $copy === $original may be true, but only for imutable content objects.

Returns:
Content. A copy of this object.

Implements Content.

Definition at line 422 of file ContentHandlerTest.php.

Returns native represenation of the data.

Interpretation depends on the data model used, as given by getDataModel().

Returns:
mixed the native representation of the content. Could be a string, a nested array structure, an object, a binary blob... anything, really.

Implements Content.

Definition at line 395 of file ContentHandlerTest.php.

References data.

Referenced by getParserOutput().

DummyContentForTesting::getParserOutput ( Title title,
revId = null,
ParserOptions options = null,
generateHtml = true 
)
Parameters:
Title$title
null$revId
null | ParserOptions$options
boolean$generateHtmlwhether to generate Html (default: true). If false, the result of calling getText() on the ParserOutput object returned by this method is undefined.
Returns:
ParserOutput

Implements Content.

Definition at line 448 of file ContentHandlerTest.php.

References getNativeData().

returns the content's nominal size in bogo-bytes.

Returns:
int

Implements Content.

Definition at line 404 of file ContentHandlerTest.php.

References data.

Returns:
String a string representing the content in a way useful for building a full text search index. If no useful representation exists, this method returns an empty string.

Implements Content.

Definition at line 366 of file ContentHandlerTest.php.

Returns a textual representation of the content suitable for use in edit summaries and log messages.

Parameters:
int$maxlengthMaximum length of the summary text.
Returns:
string The summary text.

Implements Content.

Definition at line 384 of file ContentHandlerTest.php.

Returns:
String the wikitext to include when another page includes this content, or false if the content is not includable in a wikitext page.

Implements Content.

Definition at line 374 of file ContentHandlerTest.php.

DummyContentForTesting::isCountable ( hasLinks = null)

Returns true if this content is countable as a "real" wiki page, provided that it's also in a countable location (e.g.

a current revision in the main namespace).

Parameters:
boolean$hasLinksif it is known whether this content contains links, provide this information here, to avoid redundant parsing to find out.
Returns:
boolean

Implements Content.

Definition at line 434 of file ContentHandlerTest.php.

DummyContentForTesting::serialize ( format = null)
See also:
Content::serialize
Parameters:
string | null$format
Since:
1.21
Returns:
string

Reimplemented from AbstractContent.

Definition at line 358 of file ContentHandlerTest.php.

References data.


The documentation for this class was generated from the following file: