X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=blobdiff_plain;f=includes%2FMessage.php;h=78b9ec2044384dd28f656e06ff1ff98ce983b1d3;hb=c546fae8ed67279d21daf0652349975fa034f7d1;hp=96ce7a9d5df6895ad98f2d36901bb69e8dcc83d5;hpb=8824515e571eadd4a63b09e1331f35309315603f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Message.php b/includes/Message.php index 96ce7a9d5d..787ea421c5 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -1,4 +1,26 @@ content ) { + $this->content = new MessageContent( $this->key ); + } + + return $this->content; + } + /** * Returns the message parsed from wikitext to HTML. + * @since 1.17 * @return String: HTML */ public function toString() { @@ -418,6 +466,7 @@ class Message { * Magic method implementation of the above (for PHP >= 5.2.0), so we can do, eg: * $foo = Message::get($key); * $string = "$foo"; + * @since 1.18 * @return String */ public function __toString() { @@ -426,6 +475,7 @@ class Message { /** * Fully parse the text from wikitext to HTML + * @since 1.17 * @return String parsed HTML */ public function parse() { @@ -435,6 +485,7 @@ class Message { /** * Returns the message text. {{-transformation is done. + * @since 1.17 * @return String: Unescaped message text. */ public function text() { @@ -444,6 +495,7 @@ class Message { /** * Returns the message text as-is, only parameters are subsituted. + * @since 1.17 * @return String: Unescaped untransformed message text. */ public function plain() { @@ -453,6 +505,7 @@ class Message { /** * Returns the parsed message text which is always surrounded by a block element. + * @since 1.17 * @return String: HTML */ public function parseAsBlock() { @@ -463,6 +516,7 @@ class Message { /** * Returns the message text. {{-transformation is done and the result * is escaped excluding any raw parameters. + * @since 1.17 * @return String: Escaped message text. */ public function escaped() { @@ -472,6 +526,7 @@ class Message { /** * Check whether a message key has been defined currently. + * @since 1.17 * @return Bool: true if it is and false if not. */ public function exists() { @@ -480,6 +535,7 @@ class Message { /** * Check whether a message does not exist, or is an empty string + * @since 1.18 * @return Bool: true if is is and false if not * @todo FIXME: Merge with isDisabled()? */ @@ -490,7 +546,8 @@ class Message { /** * Check whether a message does not exist, is an empty string, or is "-" - * @return Bool: true if is is and false if not + * @since 1.18 + * @return Bool: true if it is and false if not */ public function isDisabled() { $message = $this->fetchMessage(); @@ -498,6 +555,7 @@ class Message { } /** + * @since 1.17 * @param $value * @return array */ @@ -506,6 +564,7 @@ class Message { } /** + * @since 1.18 * @param $value * @return array */ @@ -515,6 +574,7 @@ class Message { /** * Substitutes any paramaters into the message text. + * @since 1.17 * @param $message String: the message text * @param $type String: either before or after * @return String @@ -533,6 +593,7 @@ class Message { /** * Extracts the parameter type and preprocessed the value if needed. + * @since 1.18 * @param $param String|Array: Parameter as defined in this class. * @return Tuple(type, value) * @throws MWException @@ -553,6 +614,7 @@ class Message { /** * Wrapper for what ever method we use to parse wikitext. + * @since 1.17 * @param $string String: Wikitext message contents * @return string Wikitext parsed into HTML */ @@ -562,6 +624,7 @@ class Message { /** * Wrapper for what ever method we use to {{-transform wikitext. + * @since 1.17 * @param $string String: Wikitext message contents * @return string Wikitext with {{-constructs replaced with their values. */ @@ -571,7 +634,7 @@ class Message { /** * Wrapper for what ever method we use to get message contents - * + * @since 1.17 * @return string */ protected function fetchMessage() {