Matt Sparks: Building a PHP Framework: Part 7 – The Container
syndicated from www.phpdeveloper.org
on July 9, 2018
Matt Sparks has posted the next tutorial in his "Building a PHP framework" series to his site today. In this latest article (part seven in the series) he focuses on building the container to handle dependencies.
Part 6 began our discussion of PHP containers. Today, I’ll be going into greater detail of the subject and, along with that, I’ll run down the work done so far on the Analyze container.A huge debt of gratitude goes how to the folks behind the PHP League Container and others. I’ve learned a ton studying their code.
He then walks through the use of the container he created, Analyze/Container, to create and extract a Carbon instance. He then covers how the container is working behind the scenes to initialize the instance complete with dependencies (and optional arguments).