__isset() public method

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing isset($object->property). Note that if the property is not defined, false will be returned.
See also: http://php.net/manual/en/function.isset.php
public __isset ( string $name ) : boolean
$name string the property name or the event name
return boolean whether the named property is set (not null).
コード例 #1
0
ファイル: ManagerObject.php プロジェクト: bitxseven/yii2-big
 /**
  * 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($component->property)` or `empty($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)
 {
     if (isset($this->_data[$name])) {
         return true;
     } else {
         return parent::__isset($name);
     }
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function __isset($name)
 {
     return isset($this->options[$name]) || parent::__isset($name);
 }
コード例 #3
0
ファイル: ServiceBase.php プロジェクト: fogunkoya/yii2-eauth
 /**
  * Checks if a attribute value is null.
  * This method overrides the parent implementation by checking
  * if the attribute is null or not.
  *
  * @param string $name the attribute name.
  * @return boolean whether the attribute value is null.
  */
 public function __isset($name)
 {
     if ($this->hasAttribute($name)) {
         return true;
     } else {
         return parent::__isset($name);
     }
 }
コード例 #4
0
 /**
  * @inheritdoc
  */
 public function __isset($name)
 {
     return isset($this->_color[$name]) || parent::__isset($name);
 }