* a OutputPage tied to that context.
* @param IContextSource $context
*/
- function __construct( IContextSource $context ) {
+ public function __construct( IContextSource $context ) {
$this->setContext( $context );
}
* @param string $name Name of the meta tag
* @param string $val Value of the meta tag
*/
- function addMeta( $name, $val ) {
- array_push( $this->mMetatags, [ $name, $val ] );
+ public function addMeta( $name, $val ) {
+ $this->mMetatags[] = [ $name, $val ];
}
/**
*
* @param array $linkarr Associative array of attributes.
*/
- function addLink( array $linkarr ) {
- array_push( $this->mLinktags, $linkarr );
+ public function addLink( array $linkarr ) {
+ $this->mLinktags[] = $linkarr;
}
/**
* in preference to addLink(), to avoid duplicate link tags.
* @param string $url
*/
- function setCanonicalUrl( $url ) {
+ public function setCanonicalUrl( $url ) {
$this->mCanonicalUrl = $url;
}
*
* @param string $script Raw HTML
*/
- function addScript( $script ) {
+ public function addScript( $script ) {
$this->mScripts .= $script;
}
*
* @return array
*/
- function getHeadItemsArray() {
+ public function getHeadItemsArray() {
return $this->mHeadItems;
}
* @param ParserOutput $parserOutput
* @param array $poOptions Options to ParserOutput::getText()
*/
- function addParserOutput( ParserOutput $parserOutput, $poOptions = [] ) {
+ public function addParserOutput( ParserOutput $parserOutput, $poOptions = [] ) {
$this->addParserOutputMetadata( $parserOutput );
$this->addParserOutputText( $parserOutput, $poOptions );
}
*
* @return array
*/
- function getCacheVaryCookies() {
+ public function getCacheVaryCookies() {
if ( self::$cacheVaryCookies === null ) {
$config = $this->getConfig();
self::$cacheVaryCookies = array_values( array_unique( array_merge(
*
* @return bool
*/
- function haveCacheVaryCookies() {
+ public function haveCacheVaryCookies() {
$request = $this->getRequest();
foreach ( $this->getCacheVaryCookies() as $cookieName ) {
if ( $request->getCookie( $cookieName, '', '' ) !== '' ) {