Developing software in the Real World

Robert Basic: Grouping Zend Framework controllers in subdirectories

A few months ago, Robert Basic wrote about this handy organisational tip: Thanks to a discussion on the Zend Framework mailing list I learned about a new feature, a feature that allows for grouping action controllers in subdirectories! He then goes on to explain how he can now group controllers related to admin within a subdirectory of controllers which makes organisation easier: Best part is that this feature requires no additional configuration. Create a subdirectory… continue reading.

Zend_Config_Ini and a string

One thing that is different between Zend_Config_Xml and Zend_Config_Ini is that with Zend_Config_Xml you can pass in an XML string as the first parameter of the constructor and it will work. This doesn't work with Zend_Config_Ini as we use parse_ini_file() under the hood. With PHP 5.3 however there is is a new function called parse_ini_string() which will allow us to load arbitrary ini string into Zend_Config objects. This can't go into Zend Framework 1 though… continue reading.

tek11 photos

Following on from the previous post, these are some of my favourites from php|tek 11. On the day before tek started, playing mini-golf with Helgi, Ian,Kathy, Rafael & Lorna was fun It wouldn't be a trip to Chicago without pizza! I loved Liz's hat Lig had a two-hands-one-mouth problem… The social events at tek are great. You can usually find Liz enjoying the party! It was always fun to see groups showing off some cool… continue reading.

DPC 11 photos

A few weeks ago, I managed to visit two conferences back to back: DPC and php|tek. I managed to take some photos and these are some of my favourites from DPC. I finally managed to snag a good picture of Juozas! Harrie was an excellent DPC host. Aral gave an excellent keynote and was around for the conference. He had us in stitches when trying to tweet from an Android phone! On the hallway track,… continue reading.

ZF2 Training at PHPNW 2011!

The fabulous PHPNW conference is back again this year on October 8th and 9th and tickets are now for sale for a mere £72. Buy now! as you only have a few days left at that price. There's no need to wait for the schedule as we know from the past 3 years, that it's going to be a great selection of relevant topics. More importantly, this year there's a tutorial day on Friday 7th… continue reading.

Exploring Zend_Paginator

One area of displaying lists on web pages that I've generally disliked doing is pagination as it's a bit of a faff. Recently, I needed to do just this though as I couldn't delegate it as my colleague was too busy on other work. As a result, I thought that I should look into Zend_Paginator this time. Turns out that it's really easy to use and the documentation is great too. The really useful thing… continue reading.

Great PHP developer required in Central Birmingham

Update: This position has now been filled. So… we seem to be in the same position as everyone else and are looking to hire a new, great, PHP developer! From the spec: Big Room Internet are looking for a great PHP software engineer to bring depth to the team and spearhead our future development. You will be working across a range of projects, ideally with experience in seeing through a project from start to finish.… continue reading.

A Zend Framwork compound form element for dates

A while ago I needed to ask a user for their date of birth on a Zend_Form. The design showed three separate select elements to do this: A little bit of googling found this site which has now unfortunately disappeared, so the code in this article owes a lot of the author of that article. It turns out to be remarkably simple to create a single Zend Form element that is rendered as multiple… continue reading.

Zend Framework View Helpers

I can't seem to find an article here that consolidates my thoughts on Zend Framework's view helper system, so I thought I'd better correct that. Zend Framework's Zend_View component supports helper methods known as view helpers. They are used like this in a view script: <?php echo $this->myHelper('myParam1'); ?> Behind the scenes, this is implemented as a method within a class something like this: <?php class Zend_View_Helper_MyHelper extends Zend_View_Helper_Abstract { public function myHelper($myParam1) { $html… continue reading.

Using your own View object with Zend_Application

Let's say that you want to use your own view object within your Zend Framework application. Creating the view object is easy enough in library/App/View.php: class App_View extends Zend_View { // custom methods here } along with adding the App_ namespace to the the autoloader in application.ini: autoloadernamespaces[] = "App_" All we need to now is get Zend_Application to bootstrap with our new view class. There are two ways of doing this: within Bootstrap.php or… continue reading.