From: daniel Date: Mon, 5 May 2014 16:04:43 +0000 (+0200) Subject: TextContent: Document parameters to convert() X-Git-Tag: 1.31.0-rc.0~15885^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=12f4689cc8b2a7c6b60c93f8f62576fad4d0db46;p=lhc%2Fweb%2Fwiklou.git TextContent: Document parameters to convert() Mostly extracted from I979e2438. Change-Id: I764aae970a2ad90a54aa9816d81070d0899fd10a --- diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index a7298d3191..0c6b06f177 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -170,8 +170,7 @@ class TextContent extends AbstractContent { * * @since 1.21 * - * @param Content $that The other content object to compare this content - * object to. + * @param Content $that The other content object to compare this content object to. * @param Language $lang The language object to use for text segmentation. * If not given, $wgContentLang is used. * @@ -269,10 +268,12 @@ class TextContent extends AbstractContent { * This implementation provides lossless conversion between content models based * on TextContent. * - * @param string $toModel - * @param string $lossy + * @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 + * @return Content|bool A content object with the content model $toModel, or false if that + * conversion is not supported. * * @see Content::convert() */ @@ -286,7 +287,7 @@ class TextContent extends AbstractContent { $toHandler = ContentHandler::getForModelID( $toModel ); if ( $toHandler instanceof TextContentHandler ) { - //NOTE: ignore content serialization format - it's just text anyway. + // NOTE: ignore content serialization format - it's just text anyway. $text = $this->getNativeData(); $converted = $toHandler->unserializeContent( $text ); }