News Feed
Sections




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

Rob Allen's Blog:
On models in a Zend Framework application
December 15, 2008 @ 07:58:19

In this new post to his blog Rob Allen looks at models in a Zend Framework application, specifically what thy're for and what they can do.

Let's talk about writing models that communicate with databases within a Zend Framework application. It's a popular topic at the moment as there's been a few threads recently on the ZF mailing lists about creating models.

He looks at the two different types of relationships they have to offer - "is a" and "has a" - with some code examples illustrating each. For the "has a" relationship (since its a bit more complex) he creates a gateway class that acts as an interface to the user information allowing for method calls to things like fetchAllInLastNameOrder, setFromArray and fetchUserById.

0 comments voice your opinion now!
zendframework application model hasa isa tutorial


blog comments powered by Disqus

Similar Posts

Till Klampaeckel's Blog: Zend Framework: Writing an IN-Clause with Zend_Db

NetTuts.com: Laravel Unwrapped: Session, Auth and Cache

MaltBlue.com: Zend Framework 2 - The New HTML5 Form Fields

Padraic Brady's Blog: PHP Mutation Testing With MutateMe

NetTuts.com: How to Upload Files with CodeIgniter and AJAX


Community Events





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


community install laravel introduction podcast unittest language framework testing code interview release opinion api symfony2 list developer threedevsandamaybe series refactor

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