[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
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. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Author: | Daniel Kinzler |
File Size: | 523 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct( $modelId = null ) X-Ref |
param: string $modelId |
getModel() X-Ref |
checkModelID( $modelId ) X-Ref |
param: string $modelId The model to check |
getContentHandler() X-Ref |
getDefaultFormat() X-Ref |
getSupportedFormats() X-Ref |
isSupportedFormat( $format ) X-Ref |
param: string $format return: bool |
checkFormat( $format ) X-Ref |
param: string $format The serialization format to check. |
serialize( $format = null ) X-Ref |
param: string $format return: string |
isEmpty() X-Ref |
return: bool |
isValid() X-Ref |
Subclasses may override this to implement (light weight) validation. return: bool Always true. |
equals( Content $that = null ) X-Ref |
param: Content $that return: bool |
getSecondaryDataUpdates( Title $title, Content $old = null,$recursive = true, ParserOutput $parserOutput = null ) X-Ref |
Returns a list of DataUpdate objects for recording information about this Content in some secondary data store. This default implementation calls $this->getParserOutput( $content, $title, null, null, false ), and then calls getSecondaryDataUpdates( $title, $recursive ) on the resulting ParserOutput object. Subclasses may override this to determine the secondary data updates more efficiently, preferably without the need to generate a parser output object. param: Title $title param: Content $old param: bool $recursive param: ParserOutput $parserOutput return: DataUpdate[] |
getRedirectChain() X-Ref |
return: Title[]|null |
getRedirectTarget() X-Ref |
Subclasses that implement redirects should override this. return: null |
getUltimateRedirectTarget() X-Ref |
return: Title|null |
isRedirect() X-Ref |
return: bool |
updateRedirect( Title $target ) X-Ref |
This default implementation always returns $this. Subclasses that implement redirects should override this. param: Title $target return: Content $this |
getSection( $sectionId ) X-Ref |
return: null |
replaceSection( $sectionId, Content $with, $sectionTitle = '' ) X-Ref |
return: null |
preSaveTransform( Title $title, User $user, ParserOptions $popts ) X-Ref |
return: Content $this |
addSectionHeader( $header ) X-Ref |
return: Content $this |
preloadTransform( Title $title, ParserOptions $popts, $params = array() X-Ref |
return: Content $this |
prepareSave( WikiPage $page, $flags, $baseRevId, User $user ) X-Ref |
return: Status |
getDeletionUpdates( WikiPage $page, ParserOutput $parserOutput = null ) X-Ref |
param: WikiPage $page param: ParserOutput $parserOutput return: LinksDeletionUpdate[] |
matchMagicWord( MagicWord $word ) X-Ref |
This default implementation always returns false. Subclasses may override this to supply matching logic. param: MagicWord $word return: bool Always false. |
convert( $toModel, $lossy = '' ) X-Ref |
This base implementation calls the hook ConvertContent to enable custom conversions. Subclasses may override this to implement conversion for "their" content model. param: string $toModel param: string $lossy return: Content|bool |
getParserOutput( Title $title, $revId = null,ParserOptions $options = null, $generateHtml = true) X-Ref |
Returns a ParserOutput object containing information derived from this content. Most importantly, unless $generateHtml was false, the return value contains an HTML representation of the content. Subclasses that want to control the parser output may override this, but it is preferred to override fillParserOutput() instead. Subclasses that override getParserOutput() itself should take care to call the ContentGetParserOutput hook. param: Title $title Context title for parsing param: int|null $revId Revision ID (for {{REVISIONID}}) param: ParserOptions|null $options Parser options param: bool $generateHtml Whether or not to generate HTML return: ParserOutput Containing information derived from this content. |
fillParserOutput( Title $title, $revId,ParserOptions $options, $generateHtml, ParserOutput &$output) X-Ref |
Fills the provided ParserOutput with information derived from the content. Unless $generateHtml was false, this includes an HTML representation of the content. This is called by getParserOutput() after consulting the ContentGetParserOutput hook. Subclasses are expected to override this method (or getParserOutput(), if need be). Subclasses of TextContent should generally override getHtml() instead. This placeholder implementation always throws an exception. param: Title $title Context title for parsing param: int|null $revId Revision ID (for {{REVISIONID}}) param: ParserOptions $options Parser options param: bool $generateHtml Whether or not to generate HTML param: ParserOutput &$output The output object to fill (reference). |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |