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


PHP CActiveRecord::populateRecord方法代碼示例

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


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

示例1: populateRecord

 public function populateRecord($attributes, $callAfterFind = true)
 {
     if ($this->getPopulateMode()) {
         return parent::populateRecord($attributes, $callAfterFind);
     } else {
         return $attributes;
     }
 }
開發者ID:rosko,項目名稱:Tempo-CMS,代碼行數:8,代碼來源:ActiveRecord.php

示例2: populateRecord

 public function populateRecord($attributes, $callAfterFind = true)
 {
     $table = $this->getMetaData()->tableSchema;
     foreach ($table->columns as $column) {
         if (DataType::getInputType($column->dbType) != "file") {
             if (isset($attributes[$column->name])) {
                 SqlUtil::FixValue($attributes[$column->name]);
             }
         }
     }
     return parent::populateRecord($attributes, $callAfterFind);
 }
開發者ID:cebe,項目名稱:chive,代碼行數:12,代碼來源:Row.php

示例3: populateRecord

 /**
  * Creates an active record with the given attributes.
  * This method is internally used by the find methods.
  * @param array $attributes attribute values (column name=>column value)
  * @param boolean $callAfterFind whether to call {@link afterFind} after the record is populated.
  * @return CActiveRecord the newly created active record. The class of the object is the same as the model class.
  * Null is returned if the input data is false.
  */
 public function populateRecord($attributes, $callAfterFind = true)
 {
     $record = parent::populateRecord($attributes, $callAfterFind);
     if (is_subclass_of($record, 'ActiveRecord')) {
         foreach ($attributes as $k => $a) {
             if (!isset($record->{$k})) {
                 $record->{$k} = $a;
             }
         }
     }
     return $record;
 }
開發者ID:rizabudi,項目名稱:plansys,代碼行數:20,代碼來源:ActiveRecord.php

示例4: populateRecord

 public function populateRecord($attributes, $callAfterFind = true)
 {
     return parent::populateRecord($attributes, false);
 }
開發者ID:kuzmina-mariya,項目名稱:unizaro-spa,代碼行數:4,代碼來源:EavActiveRecord.php


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