Ever wanted to dynamically expand the functionality of an object which you retrieve from your dependency injection container, based on different needs, yet without creating messy, hard to maintain configurations? Then you&rsquo;re going to want to know about a powerful new technique - called Delegator Factories.
Master Zend Framework Articles
Ever thought of creating a Zend Expressive module, one that either scratches an itch or allows you to use a set of related functionality across multiple Zend Expressive projects? I created one recently and share how I did it with you in this three-part series.
If you need to migrate Zend Expressive applications from version one to two, don&rsquo;t do everything by hand! Save yourself time, and make use of Zend Expressive Tooling.
Recently, Jeffrey Way dateed what&rsquo;s become quite a controversial video in the PHP community on Laracasts, discussing a concept called Visual Debt.
A little while ago, I wrote two parts in a multi-part series about using Docker. As someone who’s reasonably new to Docker — <strong>and</strong> been bitten by the Docker bug — I wanted to share what I’d learned, in the hopes that others may benefit.
Docker makes it easy to build local development environments. But, what about being able to build test environments and run acceptance, unit, functional, and other types of tests? In this, the second part of the developing with Docker series, I’ll show you how to implement testing using PHPUnit and Codeception in the configuration which we’ve built.
A common requirement of web-based applications is to upload and download files. But, out of the box, there’s no simple way to download them in Zend Expressive. This tutorial shows you how - step-by-step.
In a recent application I found that I was too bound to a database as the application’s data source and wanted to decouple from it as much as possible, whilst using the least amount of effort. During research into the required changes, I came across an excellent pattern which gives a lot of flexibility, yet which doesn’t require a lot of code - it’s called the repository pattern.
When working with other developers on a project, editor and IDE differences, whilst not fatal, can be annoying, and even violate group coding standards. Put an end to that by using EditorConfig.
Zend Framework 2, like all great PHP frameworks, provides thorough infrastructure for creating forms in your application. Whether that&rsquo;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?
Want to learn how to have initialized objects with minimal code and nearly no hands-on configuration in Zend Framework 2? Come learn about setter injection.
In part two of the \Zend\Db\Sql\Select series, we create inner, outer, left and right joins as well as union queries with ease. Come learn more about building queries simply, effectively and easily in your every day applications with Zend Framework 2.
Today I take you through the Zend Framework 2 EventManager. We&rsquo;ll look at the EventManager key patterns, how it works and step through with some hands on code.
The Zend Framework Bootstrap can be one of the key aspects of getting up and running quickly with the Zend Framework. Let&rsquo;s make it easy.
<p>Recently I was asked how to rename a file with the Zend Framework that used a Zend Form and Zend File element. They key requirement was that it should not be a hack or a kludged solution. So I thought I&rsquo;d write a quick post to provide a simple example on how it was achieved.</p>
<p>Ok, we&rsquo;ve established that with the Zend Framework, we need to do a bit more work than some of the other frameworks to get up to speed - but that&rsquo;s not necessarily a bad thing - right?! But it can be a bit tedious and it&rsquo;s something as professional developers, we want to automate away. So we&rsquo;ve been addressing in this series how to do just that with a custom, extendable bootstrap class.</p> <p>In the <a href="http://www.maltblue.com/2011/10/software-development/php/a-simple-bootstrap-for-the-zend-framework" title="A Simple Zend Framework Bootstrap">first part of the series</a> we laid the foundation of our custom bootstrap class by creating a custom class directory structure, adding its namespace to the application ini and modifying the default application bootstrap so that it extends from it and had a look at the first component - caching.</p> <p>Then, in <a href="http://www.maltblue.com/2011/11/software-development/php/frameworks/zend-framework/zend-framework-bootstrap-made-simple-part-two" title="The Zend Framework Bootstrap made simple (Part 2)">the second part of the series</a>, we built on the foundation laid in part one by creating plugin resources for the <em>routing table</em>, <em>application navigation</em> and the <em>database connections</em> - these being some of the most common tasks, usually, associated with a web-based application.</p> <p>In this, the third and final part of the series, I&rsquo;m going to finish up by looking at application placeholders and surprise, no not logging as originally promised, but <em>pagination</em>. As an added extra, we&rsquo;re going to be using a <em>key feature</em> of Zend Application to make it a breeze.</p>
<p>In the <a href="http://www.maltblue.com/2011/10/software-development/php/a-simple-bootstrap-for-the-zend-framework" title="A Simple Zend Framework Bootstrap">first part of the series</a>, you&rsquo;ll remember that we laid the foundation of our custom bootstrap class by creating a custom class directory structure, adding its namespace to the application ini and creating our custom bootstrap file that our application bootstrap will extend from.</p> <p>After we did that, we put in the first but arguably the most important plugin resource – caching and stored it in the application registry. In this post we&rsquo;re going to be building on that work and adding in three new plugin resources: routing, navigation and databases.</p>
<p>When you&rsquo;re creating a new project with the Zend Framework, unlike other frameworks, you need to do more legwork. This isn&rsquo;t necessarily a bad thing, but it can sure slow you down when you&rsquo;re trying to plough through a project.</p> <p>I really enjoy using it, as it has a very well structured approach – and I like structure – it clearly lays out a file-system structure for <em>modules</em>, <em>controllers</em>, <em>actions</em>, <em>forms</em>, <em>models</em> and so on. It has good, but basic, tooling, allowing for modest project initialisation. But despite all this, it still requires a healthy investment on our part to get a proper foundation in place to use it productively.</p> <p>In a recent project I encountered this situation and felt that I mustn&rsquo;t be the only one to do so. As I plan to keep using Zend Framework I want to work around this situation and get as much productivity out of it as possible right from the get go. But how to do this?</p> <h2 id="bootstrapping">Bootstrapping</h2> <p>Well the primary focus for me is bootstrapping. It provides the majority of the core services that every project needs, from routing, data source connections, authentication, authorisation, navigation, caching and so on. So it stands to reason that it&rsquo;s a good place to start. So I want to cover what should go in to a good working bootstrap.</p>
<p>This is a mini-post showing you how to get up and running with <strong>mongoDB</strong> and <strong>Zend Framework</strong> using a series of third-party libraries, including <strong><a href="https://github.com/coen-hyde/Shanty-Mongo" title="The Shanty-Mongo Zend Framework MongoDB library by Coen Hyde">Shanty-Mongo</a></strong> library. To be honest, it&rsquo;s rather trivial, but sometimes it can be frustrating trying to find a simple, concise, reference on how to do it, specific to just your needs.</p>
I&rsquo;ve been using mongoDB and Zend Framework to make a simple, replicatable filesystem. As it went well, I thought that I could quickly apply what I&rsquo;d done to create an ultra-simple blog system. Read on to find out all about it.
So you&rsquo;re up with the RESTful buzz but you&rsquo;re concerned about security; as you should be! So what do you do? Well, like all good OOP practitioners, you don&rsquo;t reinvent the wheel. As Steve Jobs said, &ldquo;Good artists create, Great artists Steal&rdquo;, or borrow in our case. So let&rsquo;s look at the Amazon S3 model and implement that with our framework of choice - Zend Framework to protect your RESTful services.