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); }
private function set_object($field_name, YZE_Model $value) { $info = $this->objects[$field_name]; if ($info['type'] == "one-one") { $this->cache[$field_name] = $value; } else { $this->cache[$field_name][$value->get_key()] = $value; } return $this; }