merged master
[lhc/web/wiklou.git] / includes / Message.php
index 3a87a00..86d3609 100644 (file)
@@ -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