* @return Title
*/
public function getTitle() {
- if ( !isset($this->title) ) {
+ if ( $this->title === null ) {
global $wgTitle; # fallback to $wg till we can improve this
$this->title = $wgTitle;
}
* @return OutputPage object
*/
public function getOutput() {
- if ( !isset( $this->output ) ) {
+ if ( $this->output === null ) {
$this->output = new OutputPage( $this );
}
return $this->output;
* @return User
*/
public function getUser() {
- if ( !isset($this->user) ) {
+ if ( $this->user === null ) {
$this->user = User::newFromSession( $this->getRequest() );
}
return $this->user;
* @return Language
*/
public function getLang() {
- if ( !isset($this->lang) ) {
+ if ( $this->lang === null ) {
global $wgLanguageCode, $wgContLang;
$code = $this->getRequest()->getVal(
'uselang',
* @return Skin
*/
public function getSkin() {
- if ( !isset($this->skin) ) {
+ if ( $this->skin === null ) {
wfProfileIn( __METHOD__ . '-createskin' );
global $wgHiddenPrefs;
*/
public function msg() {
$args = func_get_args();
- return call_user_func_array( 'wfMessage', $args )->inLanguage( $this->getLang() );
+ return call_user_func_array( 'wfMessage', $args )->inLanguage( $this->getLang() )->title( $this->getTitle() );
}
/** Static methods **/
*/
public static function getMain() {
static $instance = null;
- if ( !isset($instance) ) {
+ if ( $instance === null ) {
$instance = new self;
}
return $instance;