redrat/presenthor

The crazy presenter pattern library

0.2.0 2019-10-14 19:07 UTC

This package is auto-updated.

Last update: 2024-11-13 19:00:52 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version Total Downloads License

The crazy presenter pattern library

First question, why?

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.

Okay, how to install then?

Easy my friend, install from composer

composer require redrat/presenthor

How to use?

This library is separated in two parts, an Item and Bag. All parts implements OutputInterface, then output array or json in string.

Item

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.

Bag

A Bag is a collection of ItemInterface and you can implement yours based on ItemBagInterface or use ItemBag implemented in this library.

Example

You can view an implementation example in https://github.com/joubertredrat/presenthor-example.