mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-18 07:20:18 +08:00
Final touchup.
This commit is contained in:
@@ -126,36 +126,6 @@ class Module extends ServiceLocator
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter magic method.
|
||||
* This method is overridden to support accessing components like reading properties.
|
||||
* @param string $name component or property name
|
||||
* @return mixed the named property value
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
if ($this->has($name)) {
|
||||
return $this->get($name);
|
||||
} else {
|
||||
return parent::__get($name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property value is null.
|
||||
* This method overrides the parent implementation by checking if the named component is loaded.
|
||||
* @param string $name the property name or the event name
|
||||
* @return boolean whether the property value is null
|
||||
*/
|
||||
public function __isset($name)
|
||||
{
|
||||
if ($this->has($name)) {
|
||||
return $this->get($name, [], false) !== null;
|
||||
} else {
|
||||
return parent::__isset($name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the module.
|
||||
* This method is called after the module is created and initialized with property values
|
||||
|
||||
Reference in New Issue
Block a user