MediaWiki
REL1_23
|
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 00389 public function getSection( $sectionId ); 00390 00403 public function replaceSection( $section, Content $with, $sectionTitle = '' ); 00404 00417 public function preSaveTransform( Title $title, User $user, ParserOptions $parserOptions ); 00418 00430 public function addSectionHeader( $header ); 00431 00444 public function preloadTransform( Title $title, ParserOptions $parserOptions, $params = array() ); 00445 00472 public function prepareSave( WikiPage $page, $flags, $baseRevId, User $user ); 00473 00489 public function getDeletionUpdates( WikiPage $page, 00490 ParserOutput $parserOutput = null ); 00491 00501 public function matchMagicWord( MagicWord $word ); 00502 00515 public function convert( $toModel, $lossy = '' ); 00516 // @todo ImagePage and CategoryPage interfere with per-content action handlers 00517 // @todo nice&sane integration of GeSHi syntax highlighting 00518 // [11:59] <vvv> Hooks are ugly; make CodeHighlighter interface and a 00519 // config to set the class which handles syntax highlighting 00520 // [12:00] <vvv> And default it to a DummyHighlighter 00521 00522 }