SfControllerAdapter
in package
Minimal sfController adapter for standalone mode.
sfAction::redirect() and sfAction::forward() delegate to the controller. This adapter captures redirect URLs and forward targets so ActionBridge can handle them after the action throws sfStopException.
Table of Contents
Methods
- actionExists() : bool
- Check whether a module/action exists (used by sfAction::forward).
- forward() : void
- Capture forward target (sfAction::forward delegates here).
- genUrl() : string
- Generate a URL for an internal route (sfController compat).
- getActionStack() : SfActionStackAdapter
- Get the action stack (sfController compat).
- getForwardAction() : string
- getForwardModule() : string
- getRedirectStatusCode() : int
- getRedirectUrl() : string
- getRenderMode() : int
- Get the rendering mode (sfController compat).
- hasForward() : bool
- hasRedirect() : bool
- redirect() : void
- Capture redirect target (sfAction::redirect delegates here).
- reset() : void
- Reset state for a new request.
Methods
actionExists()
Check whether a module/action exists (used by sfAction::forward).
public
actionExists(string $module, string $action) : bool
Parameters
- $module : string
- $action : string
Return values
boolforward()
Capture forward target (sfAction::forward delegates here).
public
forward(mixed $module, mixed $action) : void
Parameters
- $module : mixed
- $action : mixed
genUrl()
Generate a URL for an internal route (sfController compat).
public
genUrl(mixed $params[, mixed $absolute = false ]) : string
Handles:
- @routeName or @routeName?key=val → named route resolution
- Array with module/action → /module/action?params
- Plain string → returned as-is
Parameters
- $params : mixed
- $absolute : mixed = false
Return values
stringgetActionStack()
Get the action stack (sfController compat).
public
getActionStack() : SfActionStackAdapter
Return values
SfActionStackAdaptergetForwardAction()
public
getForwardAction() : string
Return values
stringgetForwardModule()
public
getForwardModule() : string
Return values
stringgetRedirectStatusCode()
public
getRedirectStatusCode() : int
Return values
intgetRedirectUrl()
public
getRedirectUrl() : string
Return values
stringgetRenderMode()
Get the rendering mode (sfController compat).
public
getRenderMode() : int
Return values
inthasForward()
public
hasForward() : bool
Return values
boolhasRedirect()
public
hasRedirect() : bool
Return values
boolredirect()
Capture redirect target (sfAction::redirect delegates here).
public
redirect(mixed $url[, mixed $delay = 0 ][, mixed $statusCode = 302 ]) : void
Parameters
- $url : mixed
- $delay : mixed = 0
- $statusCode : mixed = 302
reset()
Reset state for a new request.
public
reset() : void