示例#1
0
 static function getActivity($creatorid, $type, $receiverid, $schoolid)
 {
     if (!($objects = Obj_Cache::read('activity_' . $creatorid . "_" . $type . "_" . $receiverid . "_" . $schoolid))) {
         $tActivity = new Table_Activities();
         $activity = $tActivity->getActivity($creatorid, $type, $receiverid, $schoolid);
         Obj_Cache::save('activity_' . $creatorid . "_" . $type . "_" . $receiverid . "_" . $schoolid, $activity);
         return $activity;
     }
     return $objects;
 }
示例#2
0
文件: User.php 项目: nldfr219/zhi
 static function getUserInfo($id)
 {
     if (!($objects = Obj_Cache::read('user_' . $id))) {
         $users = new Table_UsersInfo();
         $user = $users->getUserInfo($id);
         Obj_Cache::save('user_' . $id, $user);
         return $user;
     }
     return $objects;
 }
示例#3
0
文件: Comment.php 项目: nldfr219/zhi
 public static function getComment($c_id)
 {
     if (!($objects = Obj_Cache::read('comment_' . $c_id))) {
         $tComment = new Table_Comments();
         $comments = $tComment->getComment($c_id);
         Obj_Cache::save('comment_' . $c_id, $comments);
         return $comments;
     }
     return $objects;
 }
示例#4
0
 public static function load()
 {
     if (!($objects = Obj_Cache::read('schools'))) {
         if (is_null(self::$tSchool)) {
             self::$tSchool = new Table_Schools();
         }
         $objects = self::$tSchool->getAllSchools();
         Obj_Cache::save('schools', $objects);
     }
     foreach ($objects as $o) {
         self::$array[$o['school_id']] = $o;
     }
     SchoolList::$totalCount = count(self::$array);
     return new self();
 }