From: daniel Date: Mon, 11 Jun 2012 12:10:12 +0000 (+0200) Subject: make Message content available as Content object X-Git-Tag: 1.31.0-rc.0~22097^2^2~117 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=dee1ae55cc30b08ec183df152659e9cff53c6420;p=lhc%2Fweb%2Fwiklou.git make Message content available as Content object --- diff --git a/includes/Message.php b/includes/Message.php index 3a87a001fc..b9089814ab 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -202,6 +202,11 @@ class Message { */ protected $title = null; + /** + * Content object representing the message + */ + protected $content = null; + /** * @var string */ @@ -395,7 +400,15 @@ class Message { return $this; } - /** + public function content() { + if ( !$this->content ) { + $this->content = new MessageContent( $this->key ); + } + + return $this->content; + } + + /** * Returns the message parsed from wikitext to HTML. * @return String: HTML */