> How closely does the implementation follow the Spring implementation?
Very close, the idea is to have a single controller to handle a number
of configured urls. Something like to encapsulate a group of
functionalities in a controller, or more specifically in an object.
The flow is as follow:
1- The request arrive at the halo_MultiActionController
2- An method is found to serve the request using the configured method
name resolver strategy, there are 3 implementation explained below.
3- The method definition is get using the method name resolved, to see
if the method can handle the request, this means that the method need
to take at least 2 parameters(halo_HttpRequest $request,
halo_HttpResponse $response) and another optional parameter(an class
object argument to be created and filled with the parameters of the
request when present). The method resolved is called in the delegate,
delegate is by default the halo_MultiActionController so you can
inherit from halo_MultiActionController to add the handlers methods or
you can configure an stone with a className halo_MultiActionController
and in the property delegate a reference to another stone that
contains the handlers methods without the knowledge about
halo_MultiActionController
method name resolver strategies:
halo_InternalPathMethodNameResolver get the final file path of the url
and join with a prefix and a suffix if is set and use this as a
handler method name to execute in the delegate.
halo_ParameterMethodNameResolver get the value of a configured
parameter name from the request and use it as a handler method name to
execute in the delegate.
halo_PropertiesMethodNameResolver do something similar to
halo_SimpleUrlHandlerMapping but the result is a handler method name
to execute in the delegate.