/** * Fetch a specific debugdata item from the session array * * @access public * @param string * @return string */ public function get_debugdata($key) { $debugData = Core_Storage::get('DebugData:new', $key); return $debugData; }
/** * Set storageType, Files or Session * * By default, namespaces are saved in SESSION var, and handled by your app, * but can be changed to save files, as a caching system. * * @param string storageMethod (Files/Session) * @param string dir - where to save files (must to exists) * @param integer time to life for files saved * @return array */ public static function setStorageType($type = "Session", $ttl = 0, $dir = "") { if ($type == "Session") { self::$storagetype = "Session"; } if ($type == "Memcache") { self::$storagetype = "Memcache"; } if ($type == "Files" && $dir != "") { self::$storagetype = "Files"; self::$storagedir = rtrim($dir, "/"); if ($ttl > 0) { self::$storagelifetime = $ttl; } } return self::$instance[self::$namespace]; }