Merge "resourceloader: Move queue formatting out of OutputPage"
[lhc/web/wiklou.git] / includes / OutputPage.php
index 53eb64c..cc377bc 100644 (file)
@@ -646,7 +646,7 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * Add or replace an header item to the output
+        * Add or replace a head item to the output
         *
         * Whenever possible, use more specific options like ResourceLoader modules,
         * OutputPage::addLink(), OutputPage::addMetaLink() and OutputPage::addFeedLink()
@@ -661,6 +661,16 @@ class OutputPage extends ContextSource {
                $this->mHeadItems[$name] = $value;
        }
 
+       /**
+        * Add one or more head items to the output
+        *
+        * @since 1.28
+        * @param string|string[] $value Raw HTML
+        */
+       public function addHeadItems( $values ) {
+               $this->mHeadItems = array_merge( $this->mHeadItems, (array)$values );
+       }
+
        /**
         * Check if the header item $name is already set
         *
@@ -1776,7 +1786,7 @@ class OutputPage extends ContextSource {
                }
 
                // Include profiling data
-               $this->limitReportData = $parserOutput->getLimitReportData();
+               $this->setLimitReportData( $parserOutput->getLimitReportData() );
 
                // Link flags are ignored for now, but may in the future be
                // used to mark individual language links.
@@ -3804,4 +3814,12 @@ class OutputPage extends ContextSource {
                // public API or you'll be severely disappointed when T87871 is fixed and it disappears.
                $this->addMeta( 'X-OOUI-PHP', '1' );
        }
+
+       /**
+        * @param array $data Data from ParserOutput::getLimitReportData()
+        * @since 1.28
+        */
+       public function setLimitReportData( array $data ) {
+               $this->limitReportData = $data;
+       }
 }