Here, you'll find
articles and tutorials to help you and your team grow your software testing, deployment, and documentation
skills, posted on a regular basis.
We all know that PHP implements a stateless approach to applications. The PHP process starts, variables are allocated, information generated and stored, then when the request is finished, all of the state is lost. Any information generated and stored during the request, during its lifetime, is lost when it ends.
To help work around this, PHP introduced the concept of sessions, which allows for storing information across requests. However, like most things, as application’s have become more complex, the ability to interact with sessions in a way that matches the needs of the application has continued to grow as well.
Zend Framework 2, like all great PHP frameworks, provides thorough infrastructure for creating forms in your application. Whether that’s form objects, form elements, fieldsets, validation groups or that they interact with so many other components in the Zend Framework 2 default libraries. But how do you handle external dependencies?
Is it right to use setter injection? Or is it evil, to be avoided at all costs, for the explicitness of constructor injection? In today’s post, we explore that and how to implement constructor injection in ZF2 controller classes.
Whilst there are many ways for building and executing SQL queries in Zend Framework 2, the two that I usually use, and which are also used in the ZF2 manual, are closures and the selectWith function. I previously wrote a three part series, showing how to get started using the \Zend\Db\Sql classes with Zend Framework 2, but I didn’t cover how to actually run them. So in today’s tutorial, let’s do that.
Routing is one of the key requirements in modern applications, especially in Zend Framework 2; but they shouldn’t be overly-complicated. Today, we’re going to look at how to build a routing table, simply and easily using child and segment routes.
You may have the best platform in the world, providing the world’s greatest security or performance, to a level unmatched by anyone else. But will developers use it?
If you want the number one screencasting resource, use Wistia. Here’s a set of reasons why.
I’ve been talking, increasingly, recently about screencasting and learning the ins and outs of making them. From the software to use, how to do storyboarding, how to do post-production, it’s been a fun and exciting time getting to know so many new things.
For the longest time, I’ve been using closures in my Zend Framework 2 Modules Module class. I know they’re not always the best approach, but they’re not necessarily wrong either.
But after reviewing Gary Hockin’s recent talk at PHP Conference UK, I was reminded that outside of APC and OPCache, closures aren’t cacheable.