The dispatcher
enforces that your action controllers derive from this class to ensure that it can expect certain methods to be
available. The action contains an instance of the request for reading parameters from and an instance of the
response for writing to. The rest of the class concentrates on ensuring that writing actions and managing
changes from one action to another one are easy to do; There are accessor functions to get and set parameters,
and redirection functions to redirect to another action or another URL entirely.
Assuming that the standard dispatcher is used, the action functions are all named after the action??™s name
with the word ???Action??? appended. You can therefore expect a controller action class to contain functions such
as indexAction(), viewAction(), editAction(), deleteAction() etc. Each of these are discrete functions that are
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.manning-sandbox.com/forum.jspa?forumID=329
run in response to a specific URL. There are, however, a number of tasks that you will want to do regardless of
which action is run. Zend_Controller_Action provides two levels of functionality to accommodate this
requirement: init() and pre/postdispatch().
Pages:
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62