Bootstrapping the Application: a Custom View Resource Plugin
Wednesday, September 30, 2009

As well as writing a completely new resource plugin to use with Zend_Application, it is also possible to write a plugin that replaces one of the standard ones. The reason for doing this is that the existing plugins sometimes don’t do all the things that you want them to. (more…)

Posted by James at 12:02 am   0 comments

Bootstrapping the Application: a Custom Log Resource Plugin
Monday, September 28, 2009

So far, we have been looking at how to use several of the standard resource plugins that come with Zend_Application in order to initialise application resources. It is possible, indeed encouraged, to create your own custom resource plugins to handle the initialisation of resources that fall outside their scope. (more…)

Posted by James at 9:57 am   1 comment

Bootstrapping the Application: the Standard Router Resource Plugin
Sunday, September 27, 2009

The Zend Framework uses the Zend_Controller_Router_Rewrite class to decompose requests into module/controller/action/parameters, which are then despatched to the appropriate class for handling. It is possible to attach some custom handling to the router to allow for special handling of certain requests. For instance, you may want to allow Google to retrieve your sitemap via a request for http://www.example.com/sitemap.xml. The router allows this to be converted into a request for a particular combination of module/controller/action/parameters, which can then be handled in the usual way. E.g. the above request might be treated as equivalent to http://www.example.com/default/sitemap/index. (more…)

Posted by James at 2:03 pm   0 comments

Bootstrapping the Application: the Standard Navigation Resource Plugin
Saturday, September 26, 2009

Zend_Navigation is a Zend Framework component used to represent the pages on a web site and transform this into things such as page navigation and Google sitemaps. The standard navigation resource plugin Zend_Application_Resource_Navigation can be used to configure an instance of Zend_Navigation. (more…)

Posted by James at 3:10 pm   0 comments

Bootstrapping the Application: the Standard Layout Resource Plugin
Friday, September 25, 2009

The Zend Framework offers a template module called Zend_Layout. This is primarily used to render the standard parts of a web page, such as the header, sidebars and footer, and to insert the variable content into placeholders. However, it can also be used to render other things with standard layouts, such as e-mails. We shall have a look at examples of both in later posts. (more…)

Posted by James at 3:07 pm   0 comments

Bootstrapping the Application: the Standard Front Controller Resource Plugin
Thursday, September 24, 2009

The Zend Framework uses the front controller pattern. This involves all requests being channeled via a single object. To make use of the front controller you need to create an instance of Zend_Controller_Front and run it. Zend_Application automates this process. (more…)

Posted by James at 8:35 pm   0 comments

Bootstrapping the Application: the Standard Database Resource Plugin
Wednesday, September 23, 2009

The configuration of the standard database resource plugin Zend_Application_Resource_Db can be done easily via the configuration file. The following code (with sensitive settings hidden) shows how to set up the database adapter: (more…)

Posted by James at 4:29 pm   0 comments

Bootstrapping the Application: Resource Plugin Overview
Monday, September 21, 2009

The bootstrapping process supported by Zend_Application is based on a system of resource plugins. Each of these plugins is responsible for initialising an aspect of the system. There are a number of standard plugins already implemented; it is also possible to create your own, either to support something new, or to override an existing plugin. There are examples of each of these in the sample application. (more…)

Posted by James at 5:26 pm   0 comments

Bootstrapping the Application: Configuration File Overview
Sunday, September 20, 2009

The configuration file can either be in INI file or XML format. Personally, I have always used INI files with the Zend Framework, so that is the format that will be used in the sample application. (more…)

Posted by James at 4:06 pm   0 comments

Bootstrapping the Application: the index.php File
Saturday, September 19, 2009

The index.php file can be divided into three sections:

  1. Defining the global constants
  2. Setting the include paths
  3. Creating and running the Zend_Application object

(more…)

Posted by James at 12:58 pm   0 comments
Next Page »