X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FMessage.php;h=86d36096b4ed9401fde184d53ce7ab31ad7b8405;hb=b801fa8b3b3b42fb6db9129d4642f6e583b56879;hp=3a87a001fcf48f3be0074d529cf020d7b72f1844;hpb=5ec99f4b24f7ce2bd4028d62c88d6adf44bda3f9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Message.php b/includes/Message.php index 3a87a001fc..86d36096b4 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,6 +400,18 @@ class Message { return $this; } + /** + * Returns the message as a Content object. + * @return Content + */ + 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