The crazy presenter pattern library
Because I'm a polemic person and I don't like serializes. Serialize is good? Yes, but for me, in many times is a big solution to solve a little problem.
Easy my friend, install from composer
composer require redrat/presenthor
This library is separated in two parts, an Item
and Bag
.
All parts implements OutputInterface
, then output array
or json in string.
An Item
basically contains a data that will output array
or json
and you should to implement in your project based on ItemInterface
or ItemInjectableInterface
.
A Bag
is a collection of ItemInterface
and you can implement yours based on ItemBagInterface
or use ItemBag
implemented in this library.
You can view an implementation example in https://github.com/joubertredrat/presenthor-example.