Configuring the ServiceManager with Abstract Factories
In this tutorial, we see how to use abstract factories to configure the ServiceManager in Zend Framework 2. It’s one of the simplest approaches available.
In this tutorial, we see how to use abstract factories to configure the ServiceManager in Zend Framework 2. It’s one of the simplest approaches available.
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.
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.