Pragmatism in the real world

Simplified Chinese version of the Zend Framework Tutorial

Not only has Jason Qi found a lot of typographical and lexical errors in my tutorial (I know, I know.. you'd think by now I'd have found them all!) but he's also translated it into Simplified Chinese! Download the PDF from his site now! Thanks very much Jason.

Extending Zend_View_Interface for use with Smarty

Zend Framwork v0.6 has introduced new MVC code and one of the changes is that Zend_View_Interface now exists to allow for easy implementation of other templating engines other than PHP based ones like Zend_View or Savant. We use Smarty at work and when we migrate our content management framework to Zend Framework, we intend to continue using Smarty. Hence, I've created AkCom_View_Smarty to play with how we are going to use Smarty within the Zend… continue reading.

Zend Framework Tutorial for ZF v0.6

Now that work's finished for the year, I've finally had time to update my tutorial so that it works with 0.6 of the Zend Framework. There are lots of changes this time to accomodate the new MVC code that Matthew Weier O'Phinney has written. The new MVC system is very simple to use and also very powerful, so I feel that it definitely fits with the stated goals for the Zend Framework.

Version 1.1.2 of the Tutorial

Just a quick note to let you know that I've updated my tutorial to version 1.1.2. This version fixes the include path and a slew of typos that have been found by Brendon Kozlowski. Thanks Brendon! Isn't it amazing that even after all the reading that's been done of this tutorial that there are still typos to be found?!

Zend PHP 5 Certification Guide Competition

I'm still in shock that I've won! I never expected to be in a position where I could afford to get Zend Certification. I'm gonna have to read the book very carefully though as I have no intention of failing!

Polish Translation of the Zend Framework Tutorial

I'm extremely pleased to announce that there is now a Polish translation of my Zend Framework Tutorial. The PHP.pl team did the hard work and I'm very grateful to them. Thanks guys! They are hosting it on their site, so head on over to: Pierwsze kroki z Zend Framework

preg_last_error() returns No Error on preg_match() Failure

A question came up on a mailing list that I subscribe to that I thought interesting. Consider this code: <?php $result = preg_match("/href='(.*)", 'blah'); $error = preg_last_error(); if($error === PREG_NO_ERROR) { echo "No Error\n"; } else { echo "An Error Occurred\n"; } var_dump($result); The output is: Warning: preg_match(): No ending delimiter '/' found in /var/www/preg_test.php on line 2 No Error bool(false) As you can see the pattern passed to preg_match is invalid as it is… continue reading.

Zend_Config Documentation in 0.2

Note that the documentation for Zend_Config is wrong in version 0.2 of the Zend Framework, as awormus has found out! Key things to know: Instantiation $config = new Zend_Config_Ini('file.ini', 'section'); Zend_Config_Array has been removed It's no longer necessary as you can do: require 'config.php'; $config = new Zend_Config($config); Inheritence in Zend_Config_Ini has changed Was: [proof] extends = common Now: [proof : common] We'll get the docs sorted soon, sorry! Update:The wiki version of the manual… continue reading.

Zend Framework Tutorial: Version 1.1

It turns out that there are hardly any changes required to make the tutorial code compatible with version 0.2 of the Zend Framework! The only changes I had to make were to the index.php file. The two changes needed were: Zend_Config construction You now create a Zend_Config_Ini directly: $config = new Zend_Config_Ini('./application/config.ini', 'general'); is all that's needed now! Front Controller instantiation For the original tutorial, I needed a special route for compatibility. This is now… continue reading.