MediaWiki  REL1_21
Content.php
Go to the documentation of this file.
00001 <?php
00034 interface Content {
00035 
00046         public function getTextForSearchIndex();
00047 
00060         public function getWikitextForTransclusion();
00061 
00071         public function getTextForSummary( $maxLength = 250 );
00072 
00085         public function getNativeData();
00086 
00092         public function getSize();
00093 
00102         public function getModel();
00103 
00114         public function getContentHandler();
00115 
00126         public function getDefaultFormat();
00127 
00138         public function getSupportedFormats();
00139 
00154         public function isSupportedFormat( $format );
00155 
00167         public function serialize( $format = null );
00168 
00176         public function isEmpty();
00177 
00190         public function isValid();
00191 
00214         public function equals( Content $that = null );
00215 
00234         public function copy();
00235 
00248         public function isCountable( $hasLinks = null );
00249 
00267         public function getParserOutput( Title $title,
00268                 $revId = null,
00269                 ParserOptions $options = null, $generateHtml = true );
00270         // TODO: make RenderOutput and RenderOptions base classes
00271 
00301         public function getSecondaryDataUpdates( Title $title,
00302                 Content $old = null,
00303                 $recursive = true, ParserOutput $parserOutput = null
00304         );
00305 
00316         public function getRedirectChain();
00317 
00328         public function getRedirectTarget();
00329 
00345         public function getUltimateRedirectTarget();
00346 
00355         public function isRedirect();
00356 
00367         public function updateRedirect( Title $target );
00368 
00381         public function getSection( $sectionId );
00382 
00394         public function replaceSection( $section, Content $with, $sectionTitle = '' );
00395 
00407         public function preSaveTransform( Title $title, User $user, ParserOptions $parserOptions );
00408 
00419         public function addSectionHeader( $header );
00420 
00431         public function preloadTransform( Title $title, ParserOptions $parserOptions );
00432 
00459         public function prepareSave( WikiPage $page, $flags, $baseRevId, User $user );
00460 
00476         public function getDeletionUpdates( WikiPage $page,
00477                 ParserOutput $parserOutput = null );
00478 
00488         public function matchMagicWord( MagicWord $word );
00489 
00501         public function convert( $toModel, $lossy = '' );
00502 
00503                 // TODO: ImagePage and CategoryPage interfere with per-content action handlers
00504         // TODO: nice&sane integration of GeSHi syntax highlighting
00505         //   [11:59] <vvv> Hooks are ugly; make CodeHighlighter interface and a
00506         //   config to set the class which handles syntax highlighting
00507         //   [12:00] <vvv> And default it to a DummyHighlighter
00508 }