/** * Getting object * * @param int $typeId The id of the type * * @return InfoTypeAbstract */ public static function get($typeId) { if (!isset(self::$_cache[$typeId])) { self::$_cache[$typeId] = parent::get($typeId); } return self::$_cache[$typeId]; }
/** * Getting the task status from cache, or database if no cache found * * @param unknown $id * * @return TaskStatus */ public static function get($id) { if (self::cacheExsits($id)) { return self::getCache($id); } if (!($taskStatus = parent::get($id)) instanceof TaskStatus) { return null; } self::addCache($id, $taskStatus); return $taskStatus; }