|
Fusebox
|
Fusebox 4.1 introduced the invoke verb which allows you to call an object, class or webservice from the circuit. In Fusebox 4.1, for <invoke>, you must specify the method name and the list of arguments together as a single attribute, methodcall, you can use the same syntax in Fusebox 5. Given that ColdFusion's <cfinvoke> tag uses method to specify the method name and then either inline attributes or nested <cfinvokeargument> tags to specify the arguments in the method call, it was thought better to support a similar syntax. Note in particular the differences between strings and evaluated arguments in the two different forms of syntax. This is how you can specify positional (unnamed) arguments in the two different forms of syntax: If you wish to use the Fusebox 5 style of passing arguments to the invoke verb in PHP Fusebox, you must use the positional method shown above. This verb can also be used to instantiate the object as well as to call a method on an already instantiated object. In this case the syntax is different and the object argument is replaced by the class argument. To use invoke to call a web service the webservice parameter is used. For example: Note that although the Fusebox 4.1 format (methodcall on <invoke>) is not deprecated in Fusebox 5 - it is possible that it may be deprecated in a future release of Fusebox. Note also that web services are not supported in PHP4.x and so the 'webservice' attribute in invoke is not currently supported in PHP Fusebox. PHP Fusebox 5.5 when completed will be written specifically for PHP5.x, so we plan to include support for web services in that and subsequent versions. |