X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FContent.php;h=8596619d13b8aa7fc211924b8dcd7ef4b3d5652b;hb=369c60f133a5ea36c2a96ee1a276ee43e40c7194;hp=1bb43f83b6c7b890d5e833d2fa7bb7b7639984d3;hpb=f2d4db9d03a984d998db9044e63e548597511eb6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/Content.php b/includes/content/Content.php index 1bb43f83b6..8596619d13 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -77,6 +77,9 @@ interface Content { * * @since 1.21 * + * @deprecated since 1.33 use getText() for TextContent instances. + * For other content models, use specialized getters. + * * @return mixed The native representation of the content. Could be a * string, a nested array structure, an object, a binary blob... * anything, really. @@ -199,9 +202,11 @@ interface Content { * * - Will return false if $that is null. * - Will return true if $that === $this. - * - Will return false if $that->getModel() != $this->getModel(). - * - Will return false if $that->getNativeData() is not equal to $this->getNativeData(), - * where the meaning of "equal" depends on the actual data model. + * - Will return false if $that->getModel() !== $this->getModel(). + * - Will return false if get_class( $that ) !== get_class( $this ) + * - Should return false if $that->getModel() == $this->getModel() and + * $that is not semantically equivalent to $this, according to + * the data model defined by $this->getModel(). * * Implementations should be careful to make equals() transitive and reflexive: * @@ -264,7 +269,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|null $revId Optional revision ID being rendered. + * @param int|null $revId ID of the revision being rendered. + * See Parser::parse() for the ramifications. (default: null) * @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