This page is no longer updated - please visit http://ghostwire.com Thank you!
 

« PHPObject »
An Opensource Alternative to Flash Remoting
Current Release
Readme
Notes
Journal
Archives

Notes
Friday May 02, 2003

Using alternative gateways

In most of the examples (distributed with zip and on this website), we use a defaultGatewayUrl throughout an application. There may be cases where you want to have more than one gateway url on your server. For example, you may, for whatever reasons, want to separate the php classes available to each gateway.

To override the defaultGatewayUrl and use an alternative gateway in a new PHPObject, pass a second parameter when creating the object:

_global.defaultGatewayUrl = "http://mydomain.com/services/public/Gateway.php";

myObj = new PHPObject("Foo","http://mydomain.com/services/private/Gateway.php");

There is also the setGateway method you can use after creating the object:
myObj.setGateway("http://mydomain.com/services/public/Gateway.php");
I personally find this less useful, since a connection is first made the moment you create the object, not after. Nevertheless, this method is there if you ever need it.

Posted by sunny at May 2, 2003 11:53 AM

 

Comments

 

Post a comment









Remember personal info?







Zones



Forums