MediaWiki
REL1_24
|
00001 <?php 00034 interface Content { 00035 00046 public function getTextForSearchIndex(); 00047 00060 public function getWikitextForTransclusion(); 00061 00072 public function getTextForSummary( $maxLength = 250 ); 00073 00086 public function getNativeData(); 00087 00093 public function getSize(); 00094 00103 public function getModel(); 00104 00115 public function getContentHandler(); 00116 00127 public function getDefaultFormat(); 00128 00139 public function getSupportedFormats(); 00140 00156 public function isSupportedFormat( $format ); 00157 00169 public function serialize( $format = null ); 00170 00178 public function isEmpty(); 00179 00192 public function isValid(); 00193 00217 public function equals( Content $that = null ); 00218 00237 public function copy(); 00238 00252 public function isCountable( $hasLinks = null ); 00253 00275 public function getParserOutput( Title $title, $revId = null, 00276 ParserOptions $options = null, $generateHtml = true ); 00277 00278 // TODO: make RenderOutput and RenderOptions base classes 00279 00309 public function getSecondaryDataUpdates( Title $title, Content $old = null, 00310 $recursive = true, ParserOutput $parserOutput = null ); 00311 00322 public function getRedirectChain(); 00323 00334 public function getRedirectTarget(); 00335 00351 public function getUltimateRedirectTarget(); 00352 00361 public function isRedirect(); 00362 00374 public function updateRedirect( Title $target ); 00375 00388 public function getSection( $sectionId ); 00389 00404 public function replaceSection( $sectionId, Content $with, $sectionTitle = '' ); 00405 00418 public function preSaveTransform( Title $title, User $user, ParserOptions $parserOptions ); 00419 00431 public function addSectionHeader( $header ); 00432 00445 public function preloadTransform( Title $title, ParserOptions $parserOptions, $params = array() ); 00446 00473 public function prepareSave( WikiPage $page, $flags, $baseRevId, User $user ); 00474 00490 public function getDeletionUpdates( WikiPage $page, 00491 ParserOutput $parserOutput = null ); 00492 00502 public function matchMagicWord( MagicWord $word ); 00503 00516 public function convert( $toModel, $lossy = '' ); 00517 // @todo ImagePage and CategoryPage interfere with per-content action handlers 00518 // @todo nice&sane integration of GeSHi syntax highlighting 00519 // [11:59] <vvv> Hooks are ugly; make CodeHighlighter interface and a 00520 // config to set the class which handles syntax highlighting 00521 // [12:00] <vvv> And default it to a DummyHighlighter 00522 00523 }