mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-08 17:07:33 +08:00
Corrected the Component::__isset() docs
__isset() returns true if the property is set; not if it's null.
This commit is contained in:
committed by
Carsten Brandt
parent
eac3771af5
commit
6d2bc06bf4
@ -199,16 +199,16 @@ class Component extends Object
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a property value is null.
|
* Checks if a property value is set.
|
||||||
* This method will check in the following order and act accordingly:
|
* This method will check in the following order and act accordingly:
|
||||||
*
|
*
|
||||||
* - a property defined by a setter: return whether the property value is null
|
* - a property defined by a setter: return whether the property value is set
|
||||||
* - a property of a behavior: return whether the property value is null
|
* - a property of a behavior: return whether the property value is set
|
||||||
*
|
*
|
||||||
* Do not call this method directly as it is a PHP magic method that
|
* Do not call this method directly as it is a PHP magic method that
|
||||||
* will be implicitly called when executing `isset($component->property)`.
|
* will be implicitly called when executing `isset($component->property)`.
|
||||||
* @param string $name the property name or the event name
|
* @param string $name the property name or the event name
|
||||||
* @return boolean whether the named property is null
|
* @return boolean whether the named property is set
|
||||||
*/
|
*/
|
||||||
public function __isset($name)
|
public function __isset($name)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user