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; }
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; }
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; }
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(); }