I like to find improvements and new ideas how to solve some task so the result will bring benefits. In one of my project I wanted to reduce two HTML form inputs to one and extract the city name from search text. Thanks to Rubix ML, I was able to tackle the task and practice named entity recognition in PHP, which was the main reason.
Sooner or later, every bigger project needs cron jobs for background operations, maintenance or some periodical reports etc. If you are beginning with Laminas framework, it maight not be straight obvious how to use Laminas in a cron file, so you can access services and configured view renderer and other properties.
Laminas MVC has an event driven architecture. This means that the flow of the application depends on triggered events in Laminas during HTTP request. The event triggering may carry additional information and usually passed to a specific event listeners. Having an event driven architecture allows the Laminas application to be loosely coupled and thus very extensible.
After several courses I took on Coursera, I have got a chance to apply machine learning on a real project – computer digit classification in PHP web applicaton. Lots of blog posts show you how to develop model that reads prepared data, displays model accuracy and loss, than describe some hyperparameters tuning and the results. I was (quite deep) digging for informations how to implement whole proces in real application. From data preparation and trained model implementation. So this post has this primary goal – describe the whole process.
Delegators (delegation pattern) in Zend Framework are very useful in situations when you need to add some configuration or dependency during instantiation of service class (service manager knows about that class). You will achive it with a delegator factory. The factory wraps your service and provides additional "decoration".
Configuring routes using arrays is a common practice in Zend Framework documentation examples. However when the number of routes is increasing I get often lost in arrays and whole route config part starts to be confusing to me.
Every developer will sooner or later solve a situation how to store hierarchical data (parent – child relation) in relational database. As there is a lot of information and code snippets for representing trees and hierarchies in SQL, I will demonstrate practical examples and source codes you can use and save time on your project.