本文整理匯總了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);
}
}