* @ingroup Content
*/
interface Content {
-
/**
* @since 1.21
*
* is needed, $generateHtml can be set to false; in that case,
* $result->getText() may return null.
*
+ * @note To control which options are used in the cache key for the
+ * generated parser output, implementations of this method
+ * may call ParserOutput::recordOption() on the output object.
+ *
* @param $title Title The page title to use as a context for rendering
* @param $revId null|int The revision being rendered (optional)
* @param $options null|ParserOptions Any parser options
public function getParserOutput( Title $title,
$revId = null,
ParserOptions $options = null, $generateHtml = true );
+
// TODO: make RenderOutput and RenderOptions base classes
/**
*
* @param Title $target the new redirect target
*
- * @return Content a new Content object with the updated redirect (or $this if this Content object isn't a redirect)
+ * @return Content a new Content object with the updated redirect (or $this
+ * if this Content object isn't a redirect)
*/
public function updateRedirect( Title $target );
* This may be used to check the content's consistency with global state. This function should
* NOT write any information to the database.
*
- * Note that this method will usually be called inside the same transaction bracket that will be used
- * to save the new revision.
+ * Note that this method will usually be called inside the same transaction
+ * bracket that will be used to save the new revision.
*
- * Note that this method is called before any update to the page table is performed. This means that
- * $page may not yet know a page ID.
+ * Note that this method is called before any update to the page table is
+ * performed. This means that $page may not yet know a page ID.
*
* @since 1.21
*
* @param WikiPage $page The page to be saved.
- * @param int $flags bitfield for use with EDIT_XXX constants, see WikiPage::doEditContent()
- * @param int $baseRevId the ID of the current revision
- * @param User $user
+ * @param int $flags bitfield for use with EDIT_XXX constants, see WikiPage::doEditContent()
+ * @param int $baseRevId the ID of the current revision
+ * @param User $user
*
- * @return Status A status object indicating whether the content was successfully prepared for saving.
- * If the returned status indicates an error, a rollback will be performed and the
- * transaction aborted.
+ * @return Status A status object indicating whether the content was
+ * successfully prepared for saving. If the returned status indicates
+ * an error, a rollback will be performed and the transaction aborted.
*
* @see see WikiPage::doEditContent()
*/
* Converts this content object into another content object with the given content model,
* if that is possible.
*
- * @param string $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
- * @param string $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
+ * @param string $toModel the desired content model, use the CONTENT_MODEL_XXX flags.
+ * @param string $lossy flag, set to "lossy" to allow lossy conversion. If lossy conversion is
* not allowed, full round-trip conversion is expected to work without losing information.
*
* @return Content|bool A content object with the content model $toModel, or false if
* that conversion is not supported.
*/
public function convert( $toModel, $lossy = '' );
-
- // TODO: ImagePage and CategoryPage interfere with per-content action handlers
- // TODO: nice&sane integration of GeSHi syntax highlighting
+ // @todo ImagePage and CategoryPage interfere with per-content action handlers
+ // @todo nice&sane integration of GeSHi syntax highlighting
// [11:59] <vvv> Hooks are ugly; make CodeHighlighter interface and a
// config to set the class which handles syntax highlighting
// [12:00] <vvv> And default it to a DummyHighlighter