2017 © Pedro Peláez
 

library scabbia2-formatters

Scabbia2 Formatters Component

image

scabbiafw/scabbia2-formatters

Scabbia2 Formatters Component

  • Tuesday, September 22, 2015
  • by eserozvataf
  • Repository
  • 1 Watchers
  • 1 Stars
  • 297 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Scabbia2 Formatters Component

This component is a simple abstraction layer which helps scabbia2 to generate output in various formats such as Html, Console and etc. New formatters can be derived by implementing Scabbia\Formatters\FormatterInterface interface., (*1)

Build Status Scrutinizer Code Quality Total Downloads Latest Stable Version Latest Unstable Version Documentation Status, (*2)

Usage

Formatters

use Scabbia\Formatters\ConsoleFormatter;
use Scabbia\Formatters\HtmlFormatter;

if (PHP_SAPI === "cli") {
    $formatter = new ConsoleFormatter();
} else {
    $formatter = new HtmlFormatter();
}

$formatter->writeHeader(2, 'Heading');
$formatter->writeColor('red', 'important text');
$formatter->write('normal text');
$formatter->writeArray(['array', 'output']);

Auto-selecting Formatter

use Scabbia\Formatters\Formatters;

$formatter = Formatters::getCurrent();

$formatter->write('an adaptive output');

Contributing

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the eserozvataf/scabbia2-formatters repository., (*3)

  • To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
  • To report a bug: If something does not work, please report it using GitHub issues.
  • To support: Donate

The Versions

22/09 2015

dev-master

9999999-dev http://www.scabbiafw.com/

Scabbia2 Formatters Component

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0

 

The Development Requires

formatters scabbia larukedi scabbia2 scabbiafw

16/09 2015

v0.1.1

0.1.1.0 http://www.scabbiafw.com/

Scabbia2 Formatters Component

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6.0

 

The Development Requires

formatters scabbia larukedi scabbia2 scabbiafw