本文整理汇总了PHP中ActiveRecord::afterFind方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::afterFind方法的具体用法?PHP ActiveRecord::afterFind怎么用?PHP ActiveRecord::afterFind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecord
的用法示例。
在下文中一共展示了ActiveRecord::afterFind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterFind
protected function afterFind()
{
if ($this->protected_ip) {
$this->protected_ip = json_decode($this->protected_ip, TRUE);
}
parent::afterFind();
}
示例2: afterFind
public function afterFind()
{
$this->cost = number_format($this->cost / 100, 2, '.', ',');
$this->timestamp = gmdate('dS-M-Y', $this->timestamp);
$this->service_status = $this->service_status === '1' ? "Active" : "Inactive";
return parent::afterFind();
}
示例3: afterFind
public function afterFind()
{
$this->service_name = $this->getName($this->service_id);
$this->amount_charged = $this->getAmountName($this->service_id);
$this->timestamp = gmdate("Y-m-d H:i:s", $this->timestamp);
return parent::afterFind();
}
示例4: afterFind
public function afterFind()
{
parent::afterFind();
$this->useLdap = Yii::app()->user->useLdap;
$this->getRoles();
return true;
}
示例5: afterFind
protected function afterFind()
{
// $from=DateTime::createFromFormat('Y-m-d',$this->DateGet);
// $this->DateGet=$from->format('d.m.Y');
parent::afterFind();
return true;
}
示例6: afterFind
public function afterFind()
{
parent::afterFind();
$this->subscribed = Yii::app()->nfy->isSubscribed($this->id) ? "on" : "";
$this->useLdap = Yii::app()->user->useLdap;
$this->getRoles();
return true;
}
示例7: afterFind
public function afterFind()
{
parent::afterFind();
if (get_class(Yii::app()) != "CConsoleApplication") {
$this->useLdap = Yii::app()->user->useLdap;
$this->getRoles();
}
return true;
}
示例8: afterFind
function afterFind()
{
parent::afterFind();
$this->_widget = unserialize($this->widget);
$this->_rules = unserialize($this->rules);
$this->_automodel = unserialize($this->automodel);
$this->widget = Spyc::YAMLDump($this->_widget);
$this->rules = Spyc::YAMLDump($this->_rules);
$this->automodel = Spyc::YAMLDump($this->_automodel);
}
示例9: afterFind
public function afterFind()
{
if ($this->expire > 0) {
if ($this->action && $this->expire < time()) {
if ($this->action == "update") {
Yii::app()->db->createCommand()->update('blocks', array('switch' => 0, 'expire' => 0), 'id=:id', array(':id' => (int) $this->id));
} elseif ($this->action == "delete") {
Yii::app()->db->createCommand()->delete('blocks', 'id=:id', array(':id' => (int) $this->id));
}
}
}
parent::afterFind();
}
示例10: afterFind
protected function afterFind()
{
//if (empty($this->KOATUUCodeL1ID)) $this->KOATUUCodeL1ID = 105572;
//if (empty($this->KOATUUCodeL2ID)) $this->KOATUUCodeL2ID = 105574;
//if (empty($this->KOATUUCodeL3ID)) $this->KOATUUCodeL3ID = 105576;
if ($this->Birthday == "0000-00-00") {
$this->Birthday = "01.01.1995";
} else {
$this->Birthday = date("d.m.Y", strtotime($this->Birthday));
}
$this->CreateDate = date("d.m.Y", strtotime($this->CreateDate));
parent::afterFind();
return true;
}
示例11: afterFind
public function afterFind()
{
$this->person = $this->getPerson($this->person_id);
$this->location = $this->getLocation($this->location_id);
$this->department = $this->getDepartment($this->dept_id);
$this->level = $this->getLevel($this->level_id);
return parent::afterFind();
}
示例12: afterFind
public function afterFind()
{
$this->name = $this->first_name . " " . $this->last_name;
if (!empty($this->birthdate)) {
$this->birthdate_day = Common::formatDate($this->birthdate, 'd');
$this->birthdate_month = Common::formatDate($this->birthdate, 'm');
$this->birthdate_year = Common::formatDate($this->birthdate, 'Y');
}
return parent::afterFind();
}
示例13: afterFind
public function afterFind()
{
$this->client = $this->getClient($this->client_id);
return parent::afterFind();
}
示例14: afterFind
public function afterFind()
{
$this->dept_id = $this->getDeptId($this->id);
$this->role = $this->getRole($this->role_id);
return parent::afterFind();
}
示例15: afterFind
public function afterFind()
{
parent::afterFind();
$this->_mainImageFileName = $this->main_image ? $this->main_image->file_name : null;
}