コード例 #1
0
ファイル: request.php プロジェクト: ydhl/yangzie
 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);
 }
コード例 #2
0
ファイル: model.php プロジェクト: ydhl/yangzie
 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;
 }