Zend_Controller_Front


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.

Using Zend_Layout with the Zend Framework MVC

simple example of zend_layout.
First we define some defined default.


The next, we create LayoutController.


File layout in application\layouts\scripts\index.phtml

Read and write configuration files the format xml with Zend_Config


1. Read ini file.


 I have a configuration file /application/configs/db.ini as follows:



We use the class to read file Zend_Config_Xml db.xml


Output:



2.Write xml file




My01.xml output file:



SEO your blogger by Change the Title Tags for your Blog


Go to Layout>edit HTML in your Blogger dashboard.
Search for this tag: <data:blog.pageTitle/>
Replace this tag with the following:

Configuration multi modules in Zend Framework

1. Create the basic structure for the application


2. Create a detailed structure for each module (Admin & Default)


3. Configuration file application\index.php



4. Configuration file application\.htaccess



5.Install file contains application configuration application\configs\application.ini



6. Set the file contents application\layouts\layout.phtml


7. Create initialization files for all applications application\Bootstrap.phpl



8. Create files initializate for Admin module application\modules\admin\Bootstrap.php



9. IndexController inclusion of the Admin module - application\modules\admin\controllers\IndexController.php




10. Show indexAction content in the Admin module IndexController

- application\modules\admin\views\scripts\index\index.phtml


11. Create files initializate for Default module application\modules\default\Bootstrap.php



12.Inclusion of Default IndexController module - application\modules\default\controllers\IndexController.php



13. Display the contents of the Default IndexController indexAction in module

- application\modules\default\views\scripts\index\index.phtml

Video Facebook Platform

Hey Facebook Developers! This video is the first in a new series of how-to videos we'll be doing to show you how to make your web site or application more social with Facebook Connect.

Read and write configuration files the format ini with Zend_Config


1. Read ini file.


 I have a configuration file /application/configs/db.ini as follows:



We use the class to read file Zend_Config_Ini db.ini


Output:



2.Write ini file




My01.ini output file: