X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fcontent%2FContent.php;h=bb3fb107d734670fdc36306760e61567f39c2630;hp=3e5878281fda632b3ae5ba2b5074d154802d5abf;hb=fe94275c8fcfc248a5eae857dde7c5772d993ab5;hpb=967a96e7fa5910f8fc451590decb381dbfb481ba diff --git a/includes/content/Content.php b/includes/content/Content.php index 3e5878281f..bb3fb107d7 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -162,7 +162,7 @@ interface Content { * * @since 1.21 * - * @param string $format The desired serialization format, or null for the default format. + * @param string|null $format The desired serialization format, or null for the default format. * * @return string Serialized form of this Content object. */ @@ -210,7 +210,7 @@ interface Content { * * @since 1.21 * - * @param Content $that The Content object to compare to. + * @param Content|null $that The Content object to compare to. * * @return bool True if this Content object is equal to $that, false otherwise. */ @@ -262,8 +262,8 @@ interface Content { * may call ParserOutput::recordOption() on the output object. * * @param Title $title The page title to use as a context for rendering. - * @param int $revId Optional revision ID being rendered. - * @param ParserOptions $options Any parser options. + * @param int|null $revId Optional revision ID being rendered. + * @param ParserOptions|null $options Any parser options. * @param bool $generateHtml Whether to generate HTML (default: true). If false, * the result of calling getText() on the ParserOutput object returned by * this method is undefined. @@ -284,24 +284,19 @@ interface Content { * made to replace information about the old content with information about * the new content. * - * This default implementation calls - * $this->getParserOutput( $content, $title, null, null, false ), - * and then calls getSecondaryDataUpdates( $title, $recursive ) on the - * resulting ParserOutput object. - * - * Subclasses may implement this to determine the necessary updates more - * efficiently, or make use of information about the old content. + * @deprecated since 1.32, call and override + * ContentHandler::getSecondaryDataUpdates instead. * * @note Implementations should call the SecondaryDataUpdates hook, like * AbstractContent does. * * @param Title $title The context for determining the necessary updates - * @param Content $old An optional Content object representing the + * @param Content|null $old An optional Content object representing the * previous content, i.e. the content being replaced by this Content * object. * @param bool $recursive Whether to include recursive updates (default: * false). - * @param ParserOutput $parserOutput Optional ParserOutput object. + * @param ParserOutput|null $parserOutput Optional ParserOutput object. * Provide if you have one handy, to avoid re-parsing of the content. * * @return DataUpdate[] A list of DataUpdate objects for putting information @@ -481,8 +476,10 @@ interface Content { * the current state of the database. * * @since 1.21 + * @deprecated since 1.32, call and override + * ContentHandler::getDeletionUpdates instead. * - * @param WikiPage $page The deleted page + * @param WikiPage $page The page the content was deleted from. * @param ParserOutput|null $parserOutput Optional parser output object * for efficient access to meta-information about the content object. * Provide if you have one handy.