From dee1ae55cc30b08ec183df152659e9cff53c6420 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 11 Jun 2012 14:10:12 +0200 Subject: [PATCH] make Message content available as Content object --- includes/Message.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 */ -- 2.20.1