Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joubertredrat/presenthor
The crazy presenter pattern library
https://github.com/joubertredrat/presenthor
crazy-things design-pattern design-patterns php php-lib php-library php7 presenter
Last synced: 18 days ago
JSON representation
The crazy presenter pattern library
- Host: GitHub
- URL: https://github.com/joubertredrat/presenthor
- Owner: joubertredrat
- License: mit
- Created: 2019-09-24T18:24:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-14T19:09:37.000Z (about 5 years ago)
- Last Synced: 2024-05-03T08:42:51.826Z (6 months ago)
- Topics: crazy-things, design-pattern, design-patterns, php, php-lib, php-library, php7, presenter
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Presenthor
[![Build Status](https://travis-ci.org/joubertredrat/presenthor.svg?branch=master)](https://travis-ci.org/joubertredrat/presenthor)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/joubertredrat/presenthor/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/joubertredrat/presenthor/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/joubertredrat/presenthor/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/joubertredrat/presenthor/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/joubertredrat/presenthor/badges/build.png?b=master)](https://scrutinizer-ci.com/g/joubertredrat/presenthor/build-status/master)
[![Latest Stable Version](https://poser.pugx.org/redrat/presenthor/v/stable)](https://packagist.org/packages/redrat/presenthor)
[![Total Downloads](https://poser.pugx.org/redrat/presenthor/downloads)](https://packagist.org/packages/redrat/presenthor)
[![License](https://poser.pugx.org/redrat/presenthor/license)](https://packagist.org/packages/redrat/presenthor)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
```bash
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.