Преглед изворни кода

- fixed clear and close methods

Franco Ponticelli пре 15 година
родитељ
комит
f10c9bedd8
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      std/php/Session.hx

+ 4 - 4
std/php/Session.hx

@@ -2,7 +2,7 @@ package php;
 /**
 /**
 * TODO: TEST IT!
 * TODO: TEST IT!
 */
 */
-class Session {	
+class Session {
 	public static function getCacheLimiter() {
 	public static function getCacheLimiter() {
 		switch(untyped __call__("session_cache_limiter")) {
 		switch(untyped __call__("session_cache_limiter")) {
 			case "public":
 			case "public":
@@ -15,7 +15,7 @@ class Session {
 				return PrivateNoExpire;
 				return PrivateNoExpire;
 		}
 		}
 		return null;
 		return null;
-	}	
+	}
 	
 	
 	public static function setCacheLimiter(l : CacheLimiter) {
 	public static function setCacheLimiter(l : CacheLimiter) {
 		if(_started) throw "You can't set the cache limiter while the session is already in use";
 		if(_started) throw "You can't set the cache limiter while the session is already in use";
@@ -122,11 +122,11 @@ class Session {
 		untyped __call__("session_start");
 		untyped __call__("session_start");
 	}
 	}
 	
 	
-	public function clear() {
+	public static function clear() {
 		untyped __call__("session_unset");
 		untyped __call__("session_unset");
 	}
 	}
 	
 	
-	public function close() {
+	public static function close() {
 		untyped __call__("session_write_close");
 		untyped __call__("session_write_close");
 		_started = false; // TODO: not sure this useful; test if a closed session can be re-opened (I doubt)
 		_started = false; // TODO: not sure this useful; test if a closed session can be re-opened (I doubt)
 	}
 	}