Browse Source

updated Component::__isset() docs

close #7587
tags/2.0.4
Carsten Brandt 10 years ago
parent
commit
624db0e678
  1. 9
      framework/base/Component.php
  2. 4
      framework/base/Object.php

9
framework/base/Component.php

@ -199,16 +199,18 @@ class Component extends Object
}
/**
* Checks if a property value is set.
* Checks if a property is set, i.e. defined and not null.
* This method will check in the following order and act accordingly:
*
* - a property defined by a setter: return whether the property value is set
* - a property of a behavior: return whether the property value is set
* - a property defined by a setter: return whether the property is set
* - a property of a behavior: return whether the property is set
* - return `false` for non existing properties
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when executing `isset($component->property)`.
* @param string $name the property name or the event name
* @return boolean whether the named property is set
* @see http://php.net/manual/en/function.isset.php
*/
public function __isset($name)
{
@ -238,6 +240,7 @@ class Component extends Object
* will be implicitly called when executing `unset($component->property)`.
* @param string $name the property name
* @throws InvalidCallException if the property is read only.
* @see http://php.net/manual/en/function.unset.php
*/
public function __unset($name)
{

4
framework/base/Object.php

@ -163,7 +163,7 @@ class Object implements Configurable
}
/**
* Checks if the named property is set (not null).
* Checks if a property is set, i.e. defined and not null.
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when executing `isset($object->property)`.
@ -171,6 +171,7 @@ class Object implements Configurable
* Note that if the property is not defined, false will be returned.
* @param string $name the property name or the event name
* @return boolean whether the named property is set (not null).
* @see http://php.net/manual/en/function.isset.php
*/
public function __isset($name)
{
@ -192,6 +193,7 @@ class Object implements Configurable
* If the property is read-only, it will throw an exception.
* @param string $name the property name
* @throws InvalidCallException if the property is read only.
* @see http://php.net/manual/en/function.unset.php
*/
public function __unset($name)
{

Loading…
Cancel
Save