Pragmatism in the real world

Jurian Sluiman: Using Zend Framework service managers in your application

Jurian Sluiman has posted Using Zend Framework service managers in your application Many people still have problems to tune the SM to their needs. In this post I will try to explain the reason why the framework uses multiple service managers and how you can use these. I address the following topics: What are the different service managers? For what reason are different managers used? How does the service locator relate to the service manager?… continue reading.

Preparing for the ZF2 Tutorial at PHPNW12

If you are coming to the ZF2 tutorial at PHPNW12, then you will get the best out of it if you do a little preparation before you arrive. Laptop You should bring a laptop with the following working on it: A web server (preferably Apache) running PHP 5.3.3 or higher A working MySQL server along with an administration tool such as phpMyAdmin A text editor or IDE that you're comfortable coding with Vhost set up… continue reading.

ZF2: Using the ServiceManager as an Inversion of Control Container (Part 1)

Reese has posted ZF2: Using the ServiceManager as an Inversion of Control Container (Part 1) In Zend Framework 1, it was difficult to follow best practices when it came to writing testable code. Sure, you could make testable models, but once you need those models in a controller, what do you do? Zend Framework 2 makes it much easier. In this post, I'll cover the basics of injecting a model into a controller. He then… continue reading.

Module specific layouts in ZF2

If you need different layout scripts to be rendered for different modules in Zend Framework 2, then Evan Coury has made this extremely easy. His new module EdpModuleLayouts is just the ticket! Once installed, you simply have to add a new array to a config file in the config/autoload folder with the following in it: array( 'module_layouts' => array( 'Application' => 'layout/application', 'ZfcUser' => 'layout/user', ), ); i.e. you provide a list of the module… continue reading.

Zend Framework 2.0.0 STABLE Released!

Matthew Weier O'Phinney has posted to the ZF blog that Zend Framework 2.0.0 STABLE has been released. Welcome to a new generation of Zend Framework! If you've been waiting, now is the time to download the Skeleton Application, and start playing. There's a fairly good ZF2 tutorial within the official documentation too! Also, don't forget that if you're in the UK/Europe, Evan and I are doing a full day of ZF2 training at the PHPNW12… continue reading.

Introducing Avalance: A landslide presentations theme

Evan and I are giving a joint Zend Framework 2 tutorial at the PHPNW12 and ZendCon conferences this year and, consequently, we needed a way to create the presentation collaboratively, ideally using a text based system which we could store in git. There are plenty of HTML5/JS based solutions out there and we decided on landslide which is a python based markdown -> HTML presentation system. However, I really didn't like any of the default… continue reading.

ZF2 training at PHPNW 2012

Following on from last year, PHPNW 12 has a tutorial day again on 5th October 2012 and Evan Coury and I are presenting a full day tutorial on Zend Framework 2. The Zend Framework 2 tutorial day will be fantastic! This is the information about it: With Zend Framework 2 released, this tutorial will walk you through building a complete ZF2 MVC application from the ground up. Starting with the ZF2 skeleton application, we’ll discuss… continue reading.

Setting up PHP & MySQL on OS X 10.8 Mountain Lion

There is a Serbo-Croatian translation of this article kindly provided by Anja Skrba: Podešavanje PHP i MySQL na OS X 10.8 With OS X 10.8, Apple continues to ship PHP 5.3 with Xdebug, PEAR, GD and PDO_MYSQL. This is how to set it up from a clean install of 10.8. /usr/local Ensure that the following directories exist: sudo mkdir /usr/local/include sudo mkdir /usr/local/bin sudo mkdir /usr/local/lib sudo mkdir -p /usr/local/man/man1 MySQL Download the "x86, 64bit"… continue reading.

ZF1.12 is released

I'm extremely happy to note that Zend Framework 1.12 has been released and is available here. The key changes are: ZF2's StandardAutoloader and ClassMapAutoloader have been back ported to `Zend_Loader`. ZF2's EventManager has been back ported to `Zend_EventManager` New `Zend_Http_UserAgent_Features_Adapter_Browscap` component New `Zend_Mobile_Push` component, contributed by Mike Willibanks New `Zend_Gdata_Analytics` component, contributed by Daniel hartmann `Zend_Http_UserAgent_Features_Adapter_Wurfl` has been removed due to WURFL licensing changes Many many bug fixes! See the changelog Getting ZF1.12 out of… continue reading.

Setting up required fields that can be empty with Zend\InputFilter

When you create an input filter entry that has the required element set to true, then by default, the field is set up so that it must have a value in it. If you want the field to be required, but also an empty value is okay, then add the allow_empty element to your definition: $inputFilter->add(array( 'name' => 'notes', 'required' => true, 'allow_empty' => true, )); In this definition, we have a 'notes' element that… continue reading.