I decided to extract some core classes I’ve used in several of my projects into their own package, a data-manager. DataManager is a container that does exactly what it says: manages item data for things like configuration settings. It also handles dot notation and exceptions. It should:
- Be stupid simple and lean — no extra features or code
- Create, Retrieve, Update, Delete and confirm/deny single items or complex items (array)
- Allow for fallback values if get() no item
- Handle deeply nested items through dot-notation (this.one.here)
- Be super extendable super easily
I worked for a few hours and cranked out exactly what I needed using Test Driven Development. You can use the Manager freely from github or composer. But, I wanted to share my process. This series will lead you through, step-by-step, the entire creation workflow for a php composer package using Test Driven Development. This is great for beginners who want to see TDD in practice.