Zend recently introduced their Z-Ray inspection tool that allows you to see inside your application and know what's happening in your code, your database and has support for major PHP projects. In this new post to their blog they show you how to develop a custom extension for the Z-Ray system.

One of the coolest features in Z-Ray is the ability to plug in your own extensions. Meaning, you can customize existing Z-Ray panels or add your own personalized Z-Ray panel for displaying information you think is important for developing your specific application. This short tutorial will describe how to write a basic extension for Z-Ray. More specifically, we'll be writing a Z-Ray extension for WordPress that extracts and displays a list of loaded WordPress plugins.

They give you a list of things you'll need to set up before you can get started including a simple WordPress installation on a Zend Server instance. With these in place they help you create the "zray.php" file to define the extension, how to enable it and setting up a "trace" on a function to hook it into the execution. They then dump the WP plugin information and reformat it a bit to show only the list of names and versions in the output panel. As a last touch, they add a logo to the panel to show in the bottom menubar with the WordPress logo.

Rob Allen has a new post today showing how to integrate Zend Framework 2 forms into a Slim framework based application. He started the topic in a previous post and continues, this time using the Twig templating framework to handle the rendering.

The ZF2 view helpers, formRow and formElement now look like Twig functions, however we don't want to have to rewrite all our ZF2 view helpers into Twig. Fortunately, Twig supports the concept of a undefined function callback is called whenever Twig encounters a function that it doesn't know how to call. We can use this to proxy through to the ZendView system and get it to render the ZF2 view helpers.

He shows how to use this callback functionality and a custom view layer with the Slim-Views component to render the output. He includes a simple Slim example, setting up the custom View class as a parser extension and how to register the callback to invoke Twig.

The SitePoint PHP blog has a new tutorial posted from author Daniel Sipos about form handling in Symfony2. More specifically, about creating them and handling the results from their submission. This is an introduction to the topic and gets into two examples, one focusing on a view implementation and the other using the form builder.

In this tutorial we will look at two examples of using forms in Symfony 2. In the the first, we will place form elements straight in the View file and then handle the form processing manually in the controller. In the second, we'll use the Symfony form system to declare forms in an object oriented way and have Symfony process and persist the values. We will be working on a simple installation of the Symfony framework.As you may know, it comes with a default bundle called AcmeDemoBundle and we will use that to illustrate working with forms.

In the first example he looks at "non-entity forms" and shows how to create the form from normal HTML elements in the view. The form is just a simple input field and a submit button. He includes the code you'll need to process the form submission too. In the second example he includes an example of how to create the same setup but using the Form Builder instead. It's also links it to a data object, making it simpler to save the submission results.

As a PHP developer, you may have been asking yourself how to improve your skills, gain reputation or become more professional in your work. One of the ways of doing so is to get through a certification programme. The only one that covers PHP itself (not a particular framework or software solution) is being delivered by the Zend company. In the remainder of the article I will focus on this particular certificate and describe its advantages and disadvantages. At the end I will also mention some other certification programs that may be valuable to a PHP developer.

He starts with a bit of general information about the certification including some of the categories it covers. He then gets into the pros and cons, listing two items for each. He suggests that it's a good way to measure your knowledge but there is a question of how much it really proves to get a passing score.

On the PHPClasses.org site today they've published the latest episode in their "Lately in PHP" podcast series, Episode #43 - "Is Facebook HHVM going to Replace Zend Engine in PHP 6".

The Facebook HipHop Virtual Machine, HHVM, has been evolving a lot, so PHP developers are considering it as a possible replacement for Zend Engine in PHP 6. This was one of the main topics discussed by Manuel Lemos and César Rodas in the episode 43 of the Lately in PHP podcast. They also discussed other topics like FastCGI support in HHVM, having PHP function naming consistency plans for PHP 6, TLS peer verification for secure connections, and using Composer to install JavaScript, CSS and images for PHP projects.

If you're thinking about taking the Zend Certified PHP Developer (5.5) test but aren't sure exactly where to start, Lorna Mitchell has provided a list of some good resources to help you out.

Yesterday I updated my previous ZCE certificate to the Zend Certified PHP Developer qualification (the new ZCE for PHP 5.5 also got a new name). Since the ZCE 5.3 exam is no longer available and I work with various clients to prepare their teams for these certifications, it was important to me that I keep my own certification up to date. Now I've done that, I'd like to share some resources for others doing the same thing.

On the Inviqa techPortal they've posted a new tutorial from Rob Allenintroducing Apigility, the recently announced API management and creation tool from Zend. He uses his usual album/music illustration to show how to create a simple API inside the tool.

On the 7th October 2013, Zend introduced Apigility to the world. Once you get beyond the name, you see a very interesting project that allows you to easily create a web service without having to worry about the nitty-gritty details. Which details? Well, Apigility will handle content negotiation, error handling and versioning for you, allowing you to concentrate on your application. In the recently tagged 0.7 release, Apigility also supports both HTTP and OAuth2 authentication. In this tutorial we will create a simple REST API that allows us to view a list of music albums, showing how to start using Apigility and how to publish an API using this tool.

He walks you through all the steps you'll need to create the basic API, more specifically around the "Albums" data and functionality:

Creating a new project with Composer

Using the Admin dashboard to create a new API

Making a new REST endpoint (albums)

Building an Album collection endpoint (with Collection, Entity and Resource)

Making the data model, including the table SQL

He includes all the code you'll need for these last few items and shows the curl calls to make for grabbing a single and multiple album listings. There's also a brief discussion in there about how Apigility handles API versioning with some internal handling.

If you weren't able to make it to this year's ZendCon conference that just happened in Santa Clara, you can get at least a little piece of it from this new post to the Zend blog. It's a video from a keynote session from Peter Magnusson titled "Rise of the Native Cloud Developer."

At his keynote session at ZendCon, he shared some of the important and sometimes unexpected lessons Google learned while building for the cloud - such as the importance of lightweight execution containers, relying on failure, and how to overcome the speed of light when building distributed systems.

And then he went ahead to discuss about the rise of the "Cloud Native" developer - how engineers and organisations large and small now using these principles to build truly robust and scalable services, and businesses.

A few days ago at this year's ZendCon PHP conference Zend introduced Apgility, a frontend that makes creating REST APIs with Zend Framework v2 as simple as pointing and clicking. Rob Allen has taken a more in depth look at the tool and has posted his findings to his site.

At ZendCon 2013, Zend announced Apigility which is intended to ease the creation of APIs. It consists of these things: a set of ZF2 modules that do the heavy lifting of creating an API, an application wrapper for creating standalone web API applications, a built-in administration website for use in development to define the API. Rather nicely, it supports REST and RPC and deal with error handling, versioning & content negotiation for you.

He uses his usual demo application (based on this repository) and shows how to get the software installed and running on the built-in (PHP 5.4+) web server with Composer. He walks you through the things you'll need to update in the application to fit it in with the Apigility structure, but they're pretty minimal. Once you fire up the server you'll be dropped into the main Apigility admin interface. From there he shows you how to set up a custom "album" endpoint and testing it with a simple cURL call.

For those that might have heard of traits (made available in newer versions of PHP, 5.4+) but haven't seen much of a practical application, this new post from Matthew Setter could help.

Here's the situation which prompted the use of them, in a nutshell. I had a custom view helper which performed some rather elementary date & time formatting, based purely on US standards. When I first wrote the ViewHelper, I wasn't aware of any other use case I'd have for it. So it made sense for it to be self-contained. Such is life however, as later in development the need did arise to do more date/time formatting. But this time, far removed from the view layer in a model. [...] So I weighed up my options and chose to go with Traits. I'll be honest, there was the new & cool factor to them as well - as well as an irresistible sense of simplicity in them.

He shares the actual trait code he implemented, making two simple methods - one for formatting date and another for formatting the time - for his views to use. He also includes examples of it in use. He also sought some feedback