News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Pádraic Brady's Blog:
Complex Views with the Zend Framework - Part 4 The View Factory
May 02, 2007 @ 11:45:00

Pádraic Brady continues his look at complex views in a new blog post today (carrying on from parts one, two, and three. This time, the focus is on creating multiple objects on the page via Zend_View (encapsulation).

Zend_View is rather a complex class to instantiate. Not only does it have optional settings, it also requires path information in order to locate it's templates, helpers and filters.

[...] In this blog entry I'll present a class (the Factory) dedicated to churning out any number of Zps_View (subclass of Zend_View) objects using a class called Zps_View_Factory. To make things more interesting we'll also centralise all those default settings a View might require into a configuration file which our Factory will be able to use.

He start with the UML diagram of how things will fit together once the system is in place (Zps_View_Factory, Zps_View_Factory_Interface, and Zps_View). Then it's on to the sample code - creating the factory in the bootstrap file and making some simple objects.

0 comments voice your opinion now!
complex view zendframework factory object zendview complex view zendframework factory object zendview


blog comments powered by Disqus

Similar Posts

Matthew Turland's Blog: Output Filters in Zend_View

ZendCasts.com: Painless HTML Emails with Zend_Mail

Matthew Weier O'Phinney's Blog: Autocompletion with Zend Framework and Dojo

Federico Cargnelutti's Blog: An Alternative to Zend_Controller: The Router

Pádraic Brady's Blog: Complex Views with the Zend Framework - Part 6: Setting The Terminology


Community Events





Don't see your event here?
Let us know!


interview library opinion release framework series language package list install tips deployment introduction symfony api community zendserver update podcast laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework