Archive for the 'Zend Framework' Category

Page 2 of 2

Auto generating basic models for a Zend Framework app

Do you have a database with foreign keys and just wish you could have something automatically create your ZF models from it? Well, today that was me. So as a little proof of concept, this is the code I came up with to do it for me…

But before we get to that, a few caveats:

  • It’s just a proof of concept
  • The output needs updating for proper reference names, etc.
  • Outputs everything to screen in one go and doesn’t save the files.

However, it might be handy to someone, so I post it up for your comments.
Continue reading ‘Auto generating basic models for a Zend Framework app’

Zend Framework 1.5 preview release

For those that don’t know by now, version 1.5 of the Zend Framework is now out in preview release. Congratulations to everyone who has had apart in getting out this release – from programmers to documentation writers to project managers!

There are a lot of very interesting updates and new features. Some notable ones are the inclusion of Zend_Form, Zend_Layout, OpenID and LDAP adapters for authentication, Technorati web service, as well has handy tweaks Zend_Db_Table such as being able to directly access the select object.

As it’s a preview release the code isn’t intended for production systems just yet, though I hope the time frame for getting it to stable release is short enough so that I can use it soon, but long enough to work out any major kinks. ;-)

Simple image view helper for Zend Framework

Here’s a simply view helper for the Zend Framework that can be used to display image tags. It checks to see if the image file exists and if not then it’ll use the data url scheme to output a very simple image that, ironically, says ‘NO IMG’ on it. :-) Please note, though, that I’ve only seen Firefox support this scheme, as wonderful as it is!

Continue reading ‘Simple image view helper for Zend Framework’

Easy chained select lists using Zend Framework and Prototype

Building a set of select lists that are dependant of each other can be a daunting task, but for a simple two-level list – in that what you select from one drop-down will changing what’s displayed in one or more other drop-downs – is actually quite easy thanks to Zend Frameworks and Prototype, both of which support Json.

Continue reading ‘Easy chained select lists using Zend Framework and Prototype’