OutputPage: Add accessors for some protected properties
authorKunal Mehta <legoktm@gmail.com>
Wed, 3 Dec 2014 17:40:15 +0000 (09:40 -0800)
committerKunal Mehta <legoktm@gmail.com>
Wed, 3 Dec 2014 17:40:15 +0000 (09:40 -0800)
Bug: T76168
Change-Id: Iee11c217b6b0d35acfdfac916814521acda2b1a4

includes/OutputPage.php

index 2936ca3..fb2d6f4 100644 (file)
@@ -366,6 +366,16 @@ class OutputPage extends ContextSource {
                array_push( $this->mMetatags, array( $name, $val ) );
        }
 
+       /**
+        * Returns the current <meta> tags
+        *
+        * @since 1.25
+        * @return array
+        */
+       public function getMetaTags() {
+               return $this->mMetatags;
+       }
+
        /**
         * Add a new \<link\> tag to the page header.
         *
@@ -377,6 +387,16 @@ class OutputPage extends ContextSource {
                array_push( $this->mLinktags, $linkarr );
        }
 
+       /**
+        * Returns the current <link> tags
+        *
+        * @since 1.25
+        * @return array
+        */
+       public function getLinkTags() {
+               return $this->mLinktags;
+       }
+
        /**
         * Add a new \<link\> with "rel" attribute set to "meta"
         *
@@ -398,6 +418,17 @@ class OutputPage extends ContextSource {
                $this->mCanonicalUrl = $url;
        }
 
+       /**
+        * Returns the URL to be used for the <link rel=canonical> if
+        * one is set.
+        *
+        * @since 1.25
+        * @return bool|string
+        */
+       public function getCanonicalUrl() {
+               return $this->mCanonicalUrl;
+       }
+
        /**
         * Get the value of the "rel" attribute for metadata links
         *