Pragmatism in the real world

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.

Missing fields in $_POST

I recently updated to OS X 10.8 (Mountain Lion) which has PHP 5.3.13 installed by default. When testing something today, I discovered that a very very large form wasn't submitting all fields. It seemed that $_POST was being truncated. After a little bit of searching around I discovered the max_input_vars php.ini setting. This is new since PHP 5.3.9 and defaults to 1000. As OS X also comes with suhosin installed, if you want to increase… continue reading.

Evan Coury: Creating a simple view helper in Zend Framework 2

Evan Coury has posted Creating a simple view helper in Zend Framework 2 This post will show you how to create a simple view helper in Zend Framework 2. In this example, our view helper will simply return the full, absolute URL of the current page/request. He goes on to show the code required, including how to inject the Request object into the view helper.

Adam Lundrigan: Quick-and-dirty ZF2: ZendNavigation

Adam Lundrigan has posted a short article on how to use ZendNavigation in Zend Framework 2. He goes through the steps required: Add Service Manager Factory Configure Sitemap Using the View Helpers Well worth a read if you want to use ZendNavigation in your app.

Updated ZF2 tutorial for Beta 5

Zend Framework 2, Beta 5 has been released! This is an important release as we think we're at the point where the API has stabilised and expect only small BC breaks between Beta5 and the stable release. We also have two new components: ZendI18n for localisation and translation ZendEscaper for context-specific escaping that targets HTML, HTML attributes, URLs, CSS, and JavaScript. Lots of other changes happened too, so I recommend reading the announcement for all… continue reading.