MediaWiki
master
|
00001 <?php 00028 interface Content { 00029 00040 public function getTextForSearchIndex(); 00041 00054 public function getWikitextForTransclusion(); 00055 00065 public function getTextForSummary( $maxLength = 250 ); 00066 00079 public function getNativeData(); 00080 00086 public function getSize(); 00087 00096 public function getModel(); 00097 00108 public function getContentHandler(); 00109 00120 public function getDefaultFormat(); 00121 00132 public function getSupportedFormats(); 00133 00148 public function isSupportedFormat( $format ); 00149 00161 public function serialize( $format = null ); 00162 00170 public function isEmpty(); 00171 00184 public function isValid(); 00185 00208 public function equals( Content $that = null ); 00209 00228 public function copy( ); 00229 00242 public function isCountable( $hasLinks = null ); 00243 00261 public function getParserOutput( Title $title, 00262 $revId = null, 00263 ParserOptions $options = null, $generateHtml = true ); 00264 // TODO: make RenderOutput and RenderOptions base classes 00265 00295 public function getSecondaryDataUpdates( Title $title, 00296 Content $old = null, 00297 $recursive = true, ParserOutput $parserOutput = null 00298 ); 00299 00310 public function getRedirectChain(); 00311 00322 public function getRedirectTarget(); 00323 00339 public function getUltimateRedirectTarget(); 00340 00349 public function isRedirect(); 00350 00361 public function updateRedirect( Title $target ); 00362 00375 public function getSection( $sectionId ); 00376 00388 public function replaceSection( $section, Content $with, $sectionTitle = '' ); 00389 00401 public function preSaveTransform( Title $title, User $user, ParserOptions $parserOptions ); 00402 00413 public function addSectionHeader( $header ); 00414 00425 public function preloadTransform( Title $title, ParserOptions $parserOptions ); 00426 00453 public function prepareSave( WikiPage $page, $flags, $baseRevId, User $user ); 00454 00470 public function getDeletionUpdates( WikiPage $page, 00471 ParserOutput $parserOutput = null ); 00472 00482 public function matchMagicWord( MagicWord $word ); 00483 00495 public function convert( $toModel, $lossy = '' ); 00496 00497 // TODO: ImagePage and CategoryPage interfere with per-content action handlers 00498 // TODO: nice&sane integration of GeSHi syntax highlighting 00499 // [11:59] <vvv> Hooks are ugly; make CodeHighlighter interface and a 00500 // config to set the class which handles syntax highlighting 00501 // [12:00] <vvv> And default it to a DummyHighlighter 00502 }