Pragmatism in the real world

PHP Editors

Everyone has their favourite coding editor and as this topic has just come up on the Zend mailing list and comes up regularly on the Sitepoint forums, I thought I'd list the editors I use. For my main heavy lifting, I use Zend Studio. In my opinion, nothing can touch it's autocomplete functionality. I especially like the way that it uses phpdoc's @return construct for autocomplete on class objects that are returned from functions. Obviously,… continue reading.

Zend_Config: Array Reader

When casting around for another file format for Zend Config, I came up with XML or YAML. Obviously I posted to the mailing list for thoughts and Paul Jones suggested the completely obvious: PHP arrays! Another one, perhaps so obvious it is invisible, is a PHP array. Simple, straightforward, fast, no parser needed, open to programmatic manipulation. If it has not already been implemented, it would be trivial to do so. And he's right. One… continue reading.

Zend Framework: Incubator Testing

In case you missed it, the Zend Framework Subversion revision 532 is important as Darby has put in place the test harness fiiles required for testing the incubator code. Thanks Darby! For the tests to pass you must have the following on your include path: /path/to/PEAR /path/to/zend_framework/library /path/to/zend_framework/incubator /path/to/zend_framework/tests You can then run the tests from the incubator/tests directory using php -f AllTests.php. If you don't want to change your php.ini file, then php -d… continue reading.

Default Dirs

There's an interesting thread on the ZF mailing list called Default Dirs which deals with where to put your code. It's well worth a read. I've touched on this before, but thought I'd update my half a dozen readers on my current thinking :) The manual suggests: /application /models /views /controllers /document_root /images /styles .htaccess index.php /library /Zend My current directory stucture currently looks like: /application /models /views /controllers /schemas /tests config.ini /scripts /www /img… continue reading.

Zend_Config is in the Incubator

Just a quick note that the Zend_Config work I've been doing is now in the incubator within the official svn tree! (Trac link: http://framework.zend.com/developer/browser/trunk/incubator/library/Zend/Config) Thanks to Darby for sorting this out! Now everyone needs to go and bash on it and report bugs :)

Zend_Config Proposal v3: Akrabat_Config (8)

After discussion with Jayson on the Zend Framework's fw-general list and dealing with some excellent bug reports by Richard (aka OpenMacNews), I've come to the conclusion that the implementation of Akrabat_Config is wrong. I've redone it as two separate classes with no base class. We now have: Akrabat_Config Akrabat_Config_ini Akrabat_Config takes an associative array and provides read only access to it as properties properties . It also implements Countable and Iterator to make life easier.… continue reading.

Zend_Config Proposal v2.1: Akrabat_Config (7)

There's been quite a lot of interesting discussion about my Zend_Config proposal this week. As a result it became clear that the method of extension to multiple sections that I chose in Akrabat_Config v0.6 was not what was envisaged. I wrote up the four choices that I could see for doing inheritence into a post: Of course, it all depends on what is meant by "nesting" in the comment I've quoted :) It's likely that… continue reading.

Zend_Config Proposal v2: Akrabat_Config (6)

A couple of weeks ago I received feedback from the Zend Framework core team about my Zend_Config proposal v1 and have finally found the time to updated the proposal accordingly. The key points with my comments interspersed were: – The Zend_Config class shall never modify configuration information in its storage containers That's ok – I never planned to do writing to ini file anyway. – The configuration information should only be allow to be modified… continue reading.

PHP West Midlands Meeting

Last night was the first meeting of the West Midlands PHP User Group. The phpwm is a mailing list group of around 100 members and now we've placed some names to faces. Jono Bacon organised the meeting, and Open Advantage graciously hosted it and even provided food! To get us started, we had three short talks: David Goodwin of Pale Purple talked about Smarty and separation of business code from display code. Elliot of Open… continue reading.

The Zend Framework PDO driver's insert() function is fixed!

This bug is finally fixed in subversion revision 386 of the Zend Framework. The Zend Framework now as a bug tracker and this bug was reported in tickets #21 and #32. I noticed #36 first though, so attached the correct patch there. A little later I committed it to subversion and that bug is gone! Next up is unit tests for the Zend_Db tree. I've created ticket #36 to track my first attempt at getting… continue reading.