|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
Action
An Action is an adapter between the contents of an incoming
HTTP request and the corresponding business logic that should be executed to
process this request. The controller (ActionServer) will select an
appropriate Action for each request, create an instance (if necessary),
and call the perform method.
When an Action instance is first created, the ActionServer
controller will call $this->setActionServer() with an ActionServer
parameter referencing the ActionServer controller instance to which this
Action is attached.
When the ActionServer controller is to be shut down (or restarted), the
$this->setActionServer() method will be called with a
NULL argument, which can be used to clean up any allocated
resources in use by this Action.
| Field Summary | |
private ActionServer |
$actionServer
The ActionServer controller to which we are attached. |
private Locale |
$defaultLocale
The system default Locale. |
| Constructor Summary | |
Action()
|
|
| Method Summary | |
ActionForward |
execute(var $mapping,
var $form,
var $request,
var $response)
Process the specified HTTP request, and create the corresponding HTTP response (or forward to another web component that will create it), with provision for handling exceptions thrown by the business logic. |
ActionServer |
getActionServer()
Return the ActionServer controller instance to which we are attached. |
string |
getKey(var $key)
The context attributes key under which our ActionServer
instance will be stored. |
void |
saveErrors(var $request,
var $errors)
Save the specified error messages keys into the appropriate request attribute for use by the <phpmvc:errors> handler, if any messages are required. |
void |
setActionServer(var $actionServer)
Set the ActionServer controller instance to which we are attached (if actionServer is non-null), or release any allocated resources
(if actionServer is NULL). |
| Field Detail |
private Locale $defaultLocale
private ActionServer $actionServer
| Constructor Detail |
public Action()
| Method Detail |
public string getKey(var $key)
ActionServer
instance will be stored.string - public ActionServer getActionServer()
public void setActionServer(var $actionServer)
actionServer is non-null), or release any allocated resources
(if actionServer is NULL).ActionServer - The new ActionServer controller, if any$actionServer - is passed by reference
public ActionForward execute(var $mapping,
var $form,
var $request,
var $response)
ActionMapping - The ActionMapping used to select this instanceActionForm - The optional ActionForm bean for this request (if any)ServletRequest - The non-HTTP request we are processingServletResponse - The non-HTTP response we are creating
public void saveErrors(var $request,
var $errors)
HttpServletRequest - The servlet request we are processingActionErrors - Error messages object$request - is passed by reference
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||