本文整理汇总了PHP中CModel::__isset方法的典型用法代码示例。如果您正苦于以下问题:PHP CModel::__isset方法的具体用法?PHP CModel::__isset怎么用?PHP CModel::__isset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModel
的用法示例。
在下文中一共展示了CModel::__isset方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __isset
public function __isset($name)
{
if (isset($this->_attributes[$name])) {
return true;
} elseif (in_array($name, $this->attributeNames())) {
return false;
} else {
return parent::__isset($name);
}
}
示例2: __isset
/**
* (non-PHPdoc)
* @see CComponent::__isset()
*/
public function __isset($name)
{
if (isset($this->_attributes[$name])) {
return true;
} elseif (isset($this->_related[$name])) {
return true;
} elseif (array_key_exists($name, $this->relations())) {
return $this->getRelated($name) !== null;
} else {
return parent::__isset($name);
}
}
示例3: __isset
public function __isset($name)
{
if (isset($this->_attributes[$name])) {
return true;
} elseif (isset($this->getMetaData()->columns[$name])) {
return false;
} elseif (isset($this->_related[$name])) {
return true;
} elseif (isset($this->getMetaData()->relations[$name])) {
return $this->getRelated($name) !== null;
} else {
return parent::__isset($name);
}
}
示例4: __isset
/**
* Treats attributes defined by defineAttributes() as properties.
*
* @param string $name
*
* @return bool
*/
public function __isset($name)
{
if (parent::__isset($name) || in_array($name, $this->attributeNames())) {
return true;
} else {
return false;
}
}
示例5: __isset
/**
* @since v1.3.2
* @see CComponent::__isset()
*/
public function __isset($name)
{
if ($this->hasEmbeddedDocuments() && isset(self::$_embeddedConfig[get_class($this)][$name])) {
return isset($this->_embedded[$name]);
} else {
return parent::__isset($name);
}
}
示例6: __isset
/**
* Checks if a property value is null.
* This method overrides the parent implementation by checking
* if the named attribute is null or not.
* @param string $name the property name or the event name
* @return boolean whether the property value is null
*/
public function __isset($name)
{
if (isset($this->_attributes[$name])) {
return true;
} else {
if (isset($this->getMetaData()->properties[$name])) {
return false;
} else {
return parent::__isset($name);
}
}
}
示例7: __isset
/**
* Checks if a property value is null.
* This method overrides the parent implementation by checking
* if the named attribute is null or not.
* @param string $name the property name or the event name
* @return boolean whether the property value is null
*/
public function __isset($name)
{
if (isset($this->_attributes[$name])) {
return true;
} elseif ($this->getResourceSchema()->hasAttribute($name)) {
return false;
} elseif (isset($this->_linked[$name])) {
return true;
} elseif (isset($this->_links[$name])) {
return $this->getLinked($name) !== null;
} else {
return parent::__isset($name);
}
}
示例8: __isset
/**
* Checks if a property value is null.
* This method overrides the parent implementation by checking
* if the named attribute is null or not.
* @param string $name the property name or the event name
* @return boolean whether the property value is null
*/
public function __isset($name)
{
if (isset($this->_attributes[$name])) {
return true;
} else {
return parent::__isset($name);
}
}
示例9: __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 or the event name
* @return boolean
*/
public function __isset($name)
{
if (array_key_exists($name, $this->_attributes)) {
return isset($this->_attributes[$name]);
} else {
return parent::__isset($name);
}
}