Pragmatism in the real world

Zend Framework 1 or 2 training in Belgium in January 2013?

I will be in Belgium in the last week of January (from the 28th). If your company could benefit from one or two days training or consultancy in Zend Framework 1 or 2, get in touch and let's see if we can make it happen. I'm able to provide training on ZF1/ZF2 to small groups of developers at your offices and can customise the course to suit your needs and the experience of your team.… continue reading.

Martin Shwalbe: Getting Started with REST and Zend Framework 2

Martin Shwalbe: has posted Getting Started with REST and Zend Framework 2 Today i want to show you how to build a rest application. This tutorials assume you have completed the Getting Started. I will be repeating lot of the steps already explained in there. As the title of the article suggests, this is a good article on how to get started with REST and ZF2.

Zend\ServiceManager configuration keys

Zend\ServiceManager is usually configured in two places: an array in a config file or a method within your Module class. In either case, you provide a nested array of configuration information. For example, in a config file: return array( 'service_manager' => array( 'invokables' => array( 'session' => 'ZendSessionStorageSessionStorage', ), 'factories' => array( 'db' => 'ZendDbAdapterAdapterServiceFactory', ), ) ); Within the service_manager array, there are a set of nested arrays which are generally used to configure… continue reading.

Sending an HTML with text alternative email with Zend\Mail

Sending a multi-part email with Zend\Mail is easy enough, but if you want to send an HTML email with a text alternative, you need to remember to set the content-type in the headers to multipart/alternative. As this is the second time I had to work this out, I'm noting it here for the next time I forget! use Zend\Mail; use Zend\Mime\Message as MimeMessage; use Zend\Mime\Part as MimePart; function sendMail($htmlBody, $textBody, $subject, $from, $to) { $htmlPart… continue reading.

PHPNW12: Some photos

PHPNW12 was excellent. I gave a tutorial with Evan Coury and also talk on ZendForm, both of which seemed to be appreciated. I also took some photos! Tutorial day: Paul at the hackathon: Keynote speaker Ade Oshineye: Hacking in the bar: Michelangelo's closing keynote: All in all, it was an excellent conference and I recommend that you read Rafael's write up to get a feel for what it was like.

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.