本文整理汇总了PHP中yii\base\Component::__isset方法的典型用法代码示例。如果您正苦于以下问题:PHP Component::__isset方法的具体用法?PHP Component::__isset怎么用?PHP Component::__isset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\base\Component
的用法示例。
在下文中一共展示了Component::__isset方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __isset
/**
* @inheritdoc
*/
public function __isset($name)
{
if (property_exists($this->obj, $name)) {
return $this->obj->{$name} !== null;
}
return parent::__isset($name);
}
示例2: __isset
public function __isset($name)
{
if ($name == 'jsVar') {
return isset($this->_jsVar);
}
return parent::__isset($name);
}
示例3: __isset
/**
* 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, true)) {
return true;
} else {
return parent::__isset($name);
}
}
示例4: __isset
public function __isset($name)
{
if (isset($this->_api->{$name})) {
return true;
} else {
return parent::__isset($name);
}
}
示例5: __isset
/**
* @param string $name
* @return bool|mixed
* @throws \yii\base\UnknownPropertyException
*/
public function __isset($name)
{
if (isset($this->objects[$name])) {
return true;
}
return parent::__isset($name);
}
示例6: __isset
/**
* 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->hasComponent($name)) {
return $this->getComponent($name) !== null;
} else {
return parent::__isset($name);
}
}
示例7: __isset
/**
* Checks if a property value is null.
* Do not call this method. This is a PHP magic method that we override
* to allow using isset() to detect if a component property is set or not.
* @param string $name the property name
* @return boolean
*/
public function __isset($name)
{
$getter = 'get' . $name;
if (property_exists($this->getClient(), $name)) {
return true;
} elseif (method_exists($this->getClient(), $getter)) {
return true;
}
return parent::__isset($name);
}