- Managing authentication with Zend\Authentication in PHP projects
Authentication is one of the most usual tasks we need to resolve in medium and large web applications. There are many kinds of authentication. We could use database table authentication, HTTP authentication, LDAP authentication or any other kind of authentication we could imagine. Maybe we need to a…
tag Archive — "zf2"
— 2014 —
- How to properly use the Zend framework 2 service manager as a dependency injection container
The service manager is one of the most important components in Zend Framework 2. It easily allows us to handle object instances, construct them and share them between other objects. By using a simple configuration file, we define how our objects have to be constructed, by a simple new, by using a f…
- Create modules with sub-namespaces in Zend Framework 2. Part II
Some weeks ago, I explained how to create modules with sub-namespaces in a Zend Framework 2 application. On that article I created an example module that we could add in our modules directory, but what if we want to distribute that module through the composer network to be installed as a vendor modu…
- Create modules with sub-namespaces in Zend Framework 2
The Zend Framework 2 module system is one of its greatest features. You can create re-usable modules very easily. Each module has its own namespace, and each one of them should provide an autoloader implementation for the application to be able to load its classes. The basics Usually we give a name …
- How to prepare the Zend Framework 2 Certified Architect exam
Last week I passed the Zend Framework 2 Certified Architect exam. I will try to explain how did I prepare it. Studying In late March I recived an email that my exam was going to be on May the seventh, so I saw that I was going to have 4-6 weeks to prepare it. I could have started earlier, but maybe …
- Configure multiple database connections in Doctrine with Zend Framework 2
There are many situations where you need multiple database connections in your application. In this post I am going to explain how to configure a connection to 2 databases to be used by Doctrine in Zend Framework 2 and how to configure a master-slave connection. Both examples will be using MySQL. Le…
- Send emails in a Zend Framework 2 application using ZF2-AcMailer module
Some time ago I created a Zend Framework 2 module designed to wrap Zend\Mail and ease sending emails in a Zend Framework 2 application. I was copy-pasting the code of that module in many applications so I decided it was a good candidate to become an independent module. After creating it I pushed it …
- Simulate Zend Framework preDispatch and postDispatch in a Zend Framework 2 application
Any programmer that is used to use Zend Framework version 1 will have been in the situation that Zend Framework version 2 has removed Controller Plugins as they were in the first version of the framework. Controller Plugins used to allow us to attach code to be executed at some points of the executi…