public function get_modify_model() { $class = $this->get_from_post("yze_model_name"); if (!class_exists($class)) { return null; } $key = $this->get_from_post("yze_model_id"); if (!$key) { return null; } return YZE_Model::find($key, $class); }
/** * 从数据库中刷新 * * @author leeboo * * * @return */ public function refresh() { $new = YZE_Model::find($this->get_key(), get_class($this)); if ($new) { foreach ($new->get_records() as $name => $value) { $this->set($name, $value); } } return $this; }