当前位置: 首页>>代码示例>>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;未经允许,请勿转载。