当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveRecord::afterFind方法代码示例

本文整理汇总了PHP中yii\db\ActiveRecord::afterFind方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::afterFind方法的具体用法?PHP ActiveRecord::afterFind怎么用?PHP ActiveRecord::afterFind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\db\ActiveRecord的用法示例。


在下文中一共展示了ActiveRecord::afterFind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: afterFind

 public function afterFind()
 {
     if (strpos($this->email_recipient, ',')) {
         $this->email_recipient = implode(',', json_decode($this->email_recipient));
     }
     return parent::afterFind();
 }
开发者ID:hoangngk,项目名称:adminpanel,代码行数:7,代码来源:Setting.php

示例2: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->linkdata) {
         $this->linkdata = iconv('cp949', 'utf-8//IGNORE', $this->linkdata);
     }
     if ($this->linkdata2) {
         $this->linkdata2 = iconv('cp949', 'utf-8//IGNORE', $this->linkdata2);
     }
     if ($this->filedata1) {
         $this->filedata1 = iconv('cp949', 'utf-8//IGNORE', $this->filedata1);
     }
     if ($this->jungjungdata) {
         $this->jungjungdata = iconv('cp949', 'utf-8//IGNORE', $this->jungjungdata);
     }
     if ($this->maincontents) {
         $this->maincontents = iconv('cp949', 'utf-8//IGNORE', $this->maincontents);
     }
     if ($this->urlinfo1) {
         $this->urlinfo1 = iconv('cp949', 'utf-8//IGNORE', $this->urlinfo1);
     }
     if ($this->urlinfo2) {
         $this->urlinfo2 = iconv('cp949', 'utf-8//IGNORE', $this->urlinfo2);
     }
     if ($this->openbid_contents) {
         $this->openbid_contents = iconv('cp949', 'utf-8//IGNORE', $this->openbid_contents);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-i2conv,代码行数:28,代码来源:PurFileData.php

示例3: afterFind

 public function afterFind()
 {
     parent::afterFind();
     $this->configuration = self::loadConfig($this->config);
     $this->getTests();
     $this->checkLogging();
 }
开发者ID:godardth,项目名称:yii2-webception,代码行数:7,代码来源:Site.php

示例4: afterFind

 /**
  * @inheritdoc
  */
 public function afterFind()
 {
     parent::afterFind();
     if (empty($this->description)) {
         $this->description = Inflector::camel2words($this->name, true);
     }
 }
开发者ID:cakebake,项目名称:yii2-accounts,代码行数:10,代码来源:AuthItem.php

示例5: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->constno) {
         $this->constno = iconv('cp949', 'utf-8', $this->constno);
     }
     if ($this->refno) {
         $this->refno = iconv('cp949', 'utf-8', $this->refno);
     }
     if ($this->realorg) {
         $this->realorg = iconv('cp949', 'utf-8', $this->realorg);
     }
     if ($this->charger) {
         $this->charger = iconv('cp949', 'utf-8', $this->charger);
     }
     if ($this->bidperm) {
         $this->bidperm = iconv('cp949', 'utf-8', $this->bidperm);
     }
     if ($this->bidqorg) {
         $this->bidqorg = iconv('cp949', 'utf-8', $this->bidqorg);
     }
     if ($this->origin_lnk) {
         $this->origin_lnk = iconv('cp949', 'utf-8', $this->origin_lnk);
     }
     if ($this->attchd_lnk) {
         $this->attchd_lnk = iconv('cp949', 'utf-8', $this->attchd_lnk);
     }
     if ($this->perm) {
         $this->perm = iconv('cp949', 'utf-8', $this->perm);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-i2conv,代码行数:31,代码来源:V3BidValue.php

示例6: afterFind

 public function afterFind()
 {
     if ($this->getNgRestCallType() == 'list') {
         $this->trigger(self::EVENT_AFTER_NGREST_FIND);
     }
     return parent::afterFind();
 }
开发者ID:efueger,项目名称:luya,代码行数:7,代码来源:Model.php

示例7: afterFind

 public function afterFind()
 {
     parent::afterFind();
     $scheme = static::getTableSchema();
     foreach ($scheme->columns as $column) {
         if (static::isSpatial($column)) {
             $field = $column->name;
             $attr = $this->getAttribute($field);
             // get WKT
             if ($attr) {
                 if (YII_DEBUG && preg_match('/[\\x80-\\xff]+/', $attr)) {
                     /* If you get an exception here, it probably means you have overridden find()
                        and did not return sjaakp\spatial\ActiveQuery. */
                     throw new InvalidCallException('Spatial attribute not converted.');
                 }
                 $geom = SpatialHelper::wktToGeom($attr);
                 // Transform geometry FeatureCollection...
                 if ($geom['type'] == 'GeometryCollection') {
                     $feats = [];
                     foreach ($geom['geometries'] as $g) {
                         $feats[] = ['type' => 'Feature', 'geometry' => $g, 'properties' => $this->featureProperties($field, $g)];
                     }
                     $feature = ['type' => 'FeatureCollection', 'features' => $feats];
                 } else {
                     // ... or to Feature
                     $feature = SpatialHelper::geomToFeature($geom, $this->featureProperties($field, $geom));
                 }
                 $this->setAttribute($field, Json::encode($feature));
             }
         }
     }
 }
开发者ID:sjaakp,项目名称:yii2-spatial,代码行数:32,代码来源:ActiveRecord.php

示例8: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->hasAttribute("created_at")) {
         $this->created_at = \Yii::$app->formatter->asRelativeTime($this->created_at);
     }
 }
开发者ID:awebc,项目名称:web_xbf,代码行数:7,代码来源:Base.php

示例9: afterFind

 public function afterFind()
 {
     $this->name = $this->object->name;
     $this->loadTags();
     $this->determineAccess();
     return parent::afterFind();
 }
开发者ID:app-dev-ru,项目名称:lingnote,代码行数:7,代码来源:ObjectBase.php

示例10: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->name) {
         $this->name = iconv('euckr', 'utf-8', $this->name);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-i2,代码行数:7,代码来源:CodeLocal.php

示例11: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->gname) {
         $this->gname = iconv('cp949', 'utf-8', $this->gname);
     }
     if ($this->gorg) {
         $this->gorg = iconv('cp949', 'utf-8', $this->gorg);
     }
     if ($this->standard) {
         $this->standard = iconv('cp949', 'utf-8', $this->standard);
     }
     if ($this->unit) {
         $this->unit = iconv('cp949', 'utf-8', $this->unit);
     }
     if ($this->unitcost) {
         $this->unitcost = iconv('cp949', 'utf-8', $this->unitcost);
     }
     if ($this->period) {
         $this->period = iconv('cp949', 'utf-8', $this->period);
     }
     if ($this->place) {
         $this->place = iconv('cp949', 'utf-8', $this->place);
     }
     if ($this->condition) {
         $this->condition = iconv('cp949', 'utf-8', $this->condition);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-i2conv,代码行数:28,代码来源:V3BidGoods.php

示例12: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->g2bname) {
         $this->g2bname = iconv('cp949', 'utf-8', $this->g2bname);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-i2conv,代码行数:7,代码来源:PurG2bCatCode.php

示例13: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->realorg) {
         $this->realorg = iconv('cp949', 'utf-8', $this->realorg);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-mkpur,代码行数:7,代码来源:V3BidValue.php

示例14: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if ($this->g2b_code_nm) {
         $this->g2b_code_nm = iconv('euckr', 'utf-8', $this->g2b_code_nm);
     }
 }
开发者ID:didwjdgks,项目名称:yii2-ebid-lh,代码行数:7,代码来源:BidSubcode.php

示例15: afterFind

 public function afterFind()
 {
     parent::afterFind();
     $empresasUsuarios = EmpresasUsuarios::findAll(['usuario_id' => $this->id]);
     $this->empresa_id = \yii\helpers\ArrayHelper::getColumn($empresasUsuarios, 'empresa_id');
     $this->user_role = \yii\helpers\ArrayHelper::getColumn(Yii::$app->authManager->getRolesByUser($this->id), 'name');
 }
开发者ID:brunofunny,项目名称:agob,代码行数:7,代码来源:User.php


注:本文中的yii\db\ActiveRecord::afterFind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。