Smutty_Object
|
+--Smutty_Router
public class Smutty_Router
extends Smutty_Object
| Constructor Summary | |
|---|---|
contructor. |
|
| Method Summary | |
|---|---|
| nothing | dispatch() dispatches the request. |
| String | returns the current action |
| String | returns the name of the current controller |
| String | returns the name of the default action |
| String | returns the name of the default controller |
| static Smutty_Router | returns the singleton instance of this class |
| static String | getRouteSpec(String ctl, String act) this function searches the application config trying to match a route. |
| static boolean | isValidControllerName(String name) tests if a given controller name is valid |
| private nothing | processRoute(String spec, array url) this function process the route definition and sets the values accordingly. |
| nothing | setActionName(String name) sets the current action name |
public Smutty_Router()
contructor.
public nothing dispatch()
dispatches the request.
public String getActionName()
returns the current action
public String getControllerName()
returns the name of the current controller
public String getDefaultActionName()
returns the name of the default action
public String getDefaultControllerName()
returns the name of the default controller
public static Smutty_Router getInstance()
returns the singleton instance of this class
public static String getRouteSpec(String ctl, String act)
this function searches the application config trying to match a route. if none is found then the default route will be returned. you can specify a controller and action to find routes bound to them.
public static boolean isValidControllerName(String name)
tests if a given controller name is valid
private nothing processRoute(String spec, array url)
this function process the route definition and sets the values accordingly. the name "action" is special and changes the current value.
public nothing setActionName(String name)
sets the current action name
this class handles dispatching of requests via the correct controller and action.
/