Posts Tagged Zend Framework

Zend Framework Doctrine Model Autoloader

There have been several tutorials outlining how to autoload Doctrine Models using the Zend_Loader_Autoloader. However, none of these have permitted Zend / PEAR style naming conventions for models. I prefer to use these conventions because, although it makes my model names longer, the “name-spacing” gives a certain degree of organization and order to the application.
Read the rest of this entry »

, , ,

No Comments

Epguides.com Zend Framework API

Lately I have been writing Service API’s for Zext, my Zend Framework library extension. I plan on publishing some of the more useful ones over the next couple of months on my blog. The first of the series is the Epguides.com API.

Read the rest of this entry »

, ,

3 Comments

Per Module Zend_Layout

Sometimes when you are building a web application, you want to use different layouts for different parts of the site. For example, in a content management system, you may want one layout for normal users and another, completely different layout for site administrators. Read the rest of this entry »

, , ,

26 Comments

Fakemail for Developers

The other day when I was setting up email notifications for a Zend Framework application, I stumbled across Fakemail.

From the developers website:

fakemail is a fake mail server that captures emails as files for acceptance testing. This avoids the excessive configuration of setting up a real mail server and trying to extract mail queue content.

I am quite impressed with this handy little script (written in both Python and Perl), as it works exactly as advertised: taking out the time required to properly configure a SMTP server and saving the hassle of having dozens of test messages showered across inboxes. Instead of forwarding emails on to their recipients, it simply saves a raw copy of the email to the specified directory.

The script has a windows installer that bundles the script with python and will run on all flavors of Linux and Unix assuming that they have perl or python installed.

To configure Zend_Mail use fakemail place the following in your bootstrapper or common config file:
[php]Zend_Mail::setDefaultTransport(new Zend_Mail_Transport_Smtp(‘localhost’,array(
‘port’ => 10025
)));[/php]

The ‘localhost’ variable is the address of the computer that fakemail is running on (likely the local machine). The port number is the port that is specified when fakemail is run on the command line.

For more information about fakemail, binaries, and a usage guide. Visit the developers website at Sourceforce: http://www.lastcraft.com/fakemail.php

, ,

1 Comment

Cache-Control with Zend Framework

Today I was optimizing a site that uses heavy PHP and Ajax. I wanted to reduce the amount of data that was being sent from the server. To put this in perspective, if there were no cache hits in a page load there would be a total of 755 KB pulled down over 123 requests.
Read the rest of this entry »

, ,

5 Comments