Browse Source

added handleRequest for php

Nicolas Cannasse 17 years ago
parent
commit
46ea7f7dcd
1 changed files with 8 additions and 0 deletions
  1. 8 0
      std/haxe/remoting/HttpConnection.hx

+ 8 - 0
std/haxe/remoting/HttpConnection.hx

@@ -79,6 +79,14 @@ class HttpConnection implements Connection, implements Dynamic<Connection> {
 		neko.Lib.print(processRequest(v,ctx));
 		neko.Lib.print(processRequest(v,ctx));
 		return true;
 		return true;
 	}
 	}
+	#elseif php
+	public static function handleRequest( ctx : Context ) {
+		var v = php.Web.getParams().get("__x");
+		if( php.Web.getClientHeader("X-Haxe-Remoting") == null || v == null )
+			return false;
+		php.Lib.print(processRequest(v,ctx));
+		return true;
+	}
 	#end
 	#end
 
 
 	public static function processRequest( requestData : String, ctx : Context ) : String {
 	public static function processRequest( requestData : String, ctx : Context ) : String {