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


PHP CActiveRecord::getSafeAttributeNames方法代碼示例

本文整理匯總了PHP中CActiveRecord::getSafeAttributeNames方法的典型用法代碼示例。如果您正苦於以下問題:PHP CActiveRecord::getSafeAttributeNames方法的具體用法?PHP CActiveRecord::getSafeAttributeNames怎麽用?PHP CActiveRecord::getSafeAttributeNames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CActiveRecord的用法示例。


在下文中一共展示了CActiveRecord::getSafeAttributeNames方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSafeAttributeNames

 public function getSafeAttributeNames()
 {
     return array_merge(parent::getSafeAttributeNames(), $this->_safeAttributes);
 }
開發者ID:hit-shappens,項目名稱:testapp,代碼行數:4,代碼來源:ActiveRecordExtendable.php

示例2: getSafeAttributeNames

 public function getSafeAttributeNames()
 {
     if (!$this->eavEnable) {
         return parent::getSafeAttributeNames();
     }
     return array_merge($this->getSafeEavAttributeNames(), parent::getSafeAttributeNames());
 }
開發者ID:kuzmina-mariya,項目名稱:unizaro-spa,代碼行數:7,代碼來源:EavActiveRecord.php

示例3: getSafeAttributeNames

 /**
  * @inheritDoc
  */
 public function getSafeAttributeNames()
 {
     $scenarios = $this->scenarios();
     $scenario = $this->getScenario();
     if ($scenarios === null) {
         return parent::getSafeAttributeNames();
     } elseif (isset($scenarios[$scenario])) {
         return $scenarios[$scenario];
     } else {
         return array();
     }
 }
開發者ID:codemix,項目名稱:restyii,代碼行數:15,代碼來源:ActiveRecord.php

示例4: getSafeAttributeNames

 /**
  * Mark all table columns as safe attributes by default.
  * @return array list of safe attributes (equal to table columns).
  * @todo do something with it, coz it's security fail
  */
 public function getSafeAttributeNames()
 {
     if ($this->setOnlySafeAttributes) {
         return parent::getSafeAttributeNames();
     } else {
         return array_keys($this->getMetaData()->columns);
     }
 }
開發者ID:ttaufikhdy,項目名稱:demotwitterapi,代碼行數:13,代碼來源:SmartAR.php

示例5: getSafeAttributeNames

 public function getSafeAttributeNames()
 {
     return array_unique(array_merge(parent::getSafeAttributeNames(), $this->safeAttributes()));
 }
開發者ID:santhoshanand,項目名稱:cranium-crm,代碼行數:4,代碼來源:Model.php


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