當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。