Showing posts with label Zend_Controller. Show all posts
Showing posts with label Zend_Controller. Show all posts


1.getInstance() is used to retrieve a front controller instance

2.setControllerDirectory() is used to tell the dispatcher where to look for action controller class files

3.addControllerDirectory() is used to add a module name, it will set the directory for the default module -            overwriting it if it already exists.

4.getControllerDirectory() is used to get the current settings for the controller directory.

5.addModuleDirectory() allows you to pass the name of a directory containing one or more module directories.

6.getModuleDirectory() is used to determine the path to a particular module or the current module.

7.dispatch(Zend_Controller_Request_Abstract $request = null, Zend_Controller_Response_Abstract $response = null) does the heavy work of the front controller.
It may optionally take a request object and/or a response object.

8.Zend_Controller_Front::run($path) is a static method taking simply a path to a directory containing controllers.

9.resetInstance() can be used to clear all current settings.

10.setDefaultControllerName() and getDefaultControllerName() let you specify a different name to use for the default controller  and retrieve the current value.

11.setDefaultAction() and getDefaultAction() let you specify a different name to use for the default action  and retrieve the current value.

12.setRequest() and getRequest() let you specify the request class or object to use during the dispatch process and to retrieve the current object.

13.setRouter() getRouter() let you specify the router class or object to use during the dispatch process and to retrieve the current object.

14.setBaseUrl() and getBaseUrl() let you specify the base URL to strip when routing requests and to retrieve the current value.

15.setDispatcher() and getDispatcher() let you specify the dispatcher class or object to use during the dispatch process and retrieve the current object.

16.setResponse() and getResponse() let you specify the response class or object to use during the dispatch process and to retrieve the current object.

17.registerPlugin(Zend_Controller_Plugin_Abstract $plugin, $stackIndex = null) allows you to register plugin objects.

18.unregisterPlugin($plugin) let you unregister plugin objects. $plugin may be either a plugin object or a string denoting the class of plugin to unregister.

19.returnResponse($flag) is used to tell the front controller whether to return the response (TRUE) from dispatch(), or if the response should be automatically emitted (FALSE).

20.setParam($name, $value) allows you to set a single parameter of $name with value $value.

21.setParams(array $params) allows you to set multiple parameters at once using an associative array.

22.getParam($name) allows you to retrieve a single parameter at a time, using $name as the identifier.

23.getParams() allows you to retrieve the entire list of parameters at once.

24.clearParams() allows you to clear a single parameter , multiple named parameters, or the entire parameter stack.


Zend_Controller is the heart of Zend Framework's MVC system. MVC stands for » Model-View-Controller and is a design pattern targeted at separating application logic from display logic.Zend_Controller_Front implements a » Front Controller pattern, in which all requests are intercepted by the front controller and dispatched to individual Action Controllers based on the URLrequested.
Create the Filesystem Layout

*application: will the programming code of the application
- Controllers: source file contains the application processing

- Models: the files related to database handling

- View / scripts /: contains the directory. name of this folder will correspond to the Controller in the directory controllers. In each folder containing the. Phtml. Pages. Phtml is responsible for data output to the external interface

- Helpers: contains the file. Php. These files are simply expanding handler of the application, for example: handler involved that day in May in the library without ZF

- Filters: contains the file. Php. These files can also act as helpers in the directory file. But I often used to store the file has the function check condition of entry form.

*Html file containing the ZF startup (bootstrap), plus it can be a container imges, css, js ...
*Config file containing the application's configuration file