Manual:Content.php

From mediawiki.org

Content.php contains the Content interface, the base interface for content objects. A content object represents page content, e.g. the text to show on a page. Content objects have no knowledge about how they relate to wiki pages.

Instantiation[edit]

  • ContentHandler::makeContent() - create a Content object from given textual representation. Text will be deserialized according to given content model.

Retrieval[edit]

Transformation[edit]

If you have access to a Content object but need to transform it before saving or on page preload.

Methods[edit]

  • getTextForSearchIndex()
  • getWikitextForTransclusion()
  • getTextForSummary()
  • getSize()
  • getModel()
  • getContentHandler()
  • getDefaultFormat()
  • getSupportedFormats()
  • isSupportedFormat()
  • serialize()
  • isEmpty()
  • isValid()
  • equals()
  • copy()
  • isCountable()
  • getRedirectTarget()
  • isRedirect()
  • updateRedirect()
  • getSection()
  • replaceSection()
  • addSectionHeader()
  • matchMagicWord()
  • convert()

Deprecated or removed[edit]

Implemented by[edit]

See also[edit]