當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CModel::__isset方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:cebe,項目名稱:chive,代碼行數:10,代碼來源:SqlModel.php

示例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);
     }
 }
開發者ID:rubipikachu,項目名稱:xoso-lechung,代碼行數:16,代碼來源:EMongoModel.php

示例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);
     }
 }
開發者ID:smokeelow,項目名稱:faicore,代碼行數:14,代碼來源:yiilite.php

示例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;
     }
 }
開發者ID:andyra,項目名稱:tes,代碼行數:15,代碼來源:BaseModel.php

示例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);
     }
 }
開發者ID:nmalservet,項目名稱:biocap,代碼行數:12,代碼來源:EMongoEmbeddedDocument.php

示例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);
         }
     }
 }
開發者ID:rualatngua,項目名稱:ActiveResource,代碼行數:19,代碼來源:EActiveResource.php

示例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);
     }
 }
開發者ID:codemix,項目名稱:restyii,代碼行數:21,代碼來源:Model.php

示例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);
     }
 }
開發者ID:edwardstock,項目名稱:yii-mongo-record,代碼行數:15,代碼來源:MongoRecord.php

示例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);
     }
 }
開發者ID:icron,項目名稱:yii-dynamic-model,代碼行數:15,代碼來源:DynamicModel.php


注:本文中的CModel::__isset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。