X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontext%2FDerivativeContext.php;h=f7a1815d023e2f8c9c14ee32eccb3c02582d41cf;hb=16ef3e79c4c52aa6b74563b7eadcfc9792e7a4c4;hp=82b97ec1aa279603638cb02a782b7b5f5650ad7c;hpb=712cd1481e0a28e519e9178f458039d520458554;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/context/DerivativeContext.php b/includes/context/DerivativeContext.php index 82b97ec1aa..f7a1815d02 100644 --- a/includes/context/DerivativeContext.php +++ b/includes/context/DerivativeContext.php @@ -81,17 +81,13 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the SiteConfiguration object - * - * @param Config $s + * @param Config $config */ - public function setConfig( Config $s ) { - $this->config = $s; + public function setConfig( Config $config ) { + $this->config = $config; } /** - * Get the Config object - * * @return Config */ public function getConfig() { @@ -103,8 +99,6 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Get the stats object - * * @deprecated since 1.27 use a StatsdDataFactory from MediaWikiServices (preferably injected) * * @return IBufferingStatsdDataFactory @@ -114,8 +108,6 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Get the timing object - * * @return Timing */ public function getTiming() { @@ -127,17 +119,13 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the WebRequest object - * - * @param WebRequest $r + * @param WebRequest $request */ - public function setRequest( WebRequest $r ) { - $this->request = $r; + public function setRequest( WebRequest $request ) { + $this->request = $request; } /** - * Get the WebRequest object - * * @return WebRequest */ public function getRequest() { @@ -149,17 +137,13 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the Title object - * - * @param Title $t + * @param Title $title */ - public function setTitle( Title $t ) { - $this->title = $t; + public function setTitle( Title $title ) { + $this->title = $title; } /** - * Get the Title object - * * @return Title|null */ public function getTitle() { @@ -189,13 +173,11 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the WikiPage object - * * @since 1.19 - * @param WikiPage $p + * @param WikiPage $wikiPage */ - public function setWikiPage( WikiPage $p ) { - $this->wikipage = $p; + public function setWikiPage( WikiPage $wikiPage ) { + $this->wikipage = $wikiPage; } /** @@ -216,17 +198,13 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the OutputPage object - * - * @param OutputPage $o + * @param OutputPage $output */ - public function setOutput( OutputPage $o ) { - $this->output = $o; + public function setOutput( OutputPage $output ) { + $this->output = $output; } /** - * Get the OutputPage object - * * @return OutputPage */ public function getOutput() { @@ -238,17 +216,13 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the User object - * - * @param User $u + * @param User $user */ - public function setUser( User $u ) { - $this->user = $u; + public function setUser( User $user ) { + $this->user = $user; } /** - * Get the User object - * * @return User */ public function getUser() { @@ -260,18 +234,16 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the Language object - * - * @param Language|string $l Language instance or language code + * @param Language|string $language Language instance or language code * @throws MWException * @since 1.19 */ - public function setLanguage( $l ) { - if ( $l instanceof Language ) { - $this->lang = $l; - } elseif ( is_string( $l ) ) { - $l = RequestContext::sanitizeLangCode( $l ); - $obj = Language::factory( $l ); + public function setLanguage( $language ) { + if ( $language instanceof Language ) { + $this->lang = $language; + } elseif ( is_string( $language ) ) { + $language = RequestContext::sanitizeLangCode( $language ); + $obj = Language::factory( $language ); $this->lang = $obj; } else { throw new MWException( __METHOD__ . " was passed an invalid type of data." ); @@ -279,8 +251,6 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Get the Language object - * * @return Language * @since 1.19 */ @@ -293,18 +263,14 @@ class DerivativeContext extends ContextSource implements MutableContext { } /** - * Set the Skin object - * - * @param Skin $s + * @param Skin $skin */ - public function setSkin( Skin $s ) { - $this->skin = clone $s; + public function setSkin( Skin $skin ) { + $this->skin = clone $skin; $this->skin->setContext( $this ); } /** - * Get the Skin object - * * @return Skin */ public function getSkin() {