2017 © Pedro Peláez
 

library laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

image

izzy-p/laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

  • Sunday, March 29, 2015
  • by izzyp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 73 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Formatter Bundle

Build Status, (*1)

A formatter package that will help you to easily convert between various formats such as XML, JSON, CSV, etc..., (*2)

Goals

The goals of this library are to allow the transfomation of data formats from one type to another. See Parsers and Formats to see supported input / output formats., (*3)

Installation

Through command line:, (*4)

composer require IzzyP/laravel-formatter

Through composer.json:, (*5)

{
  "require": {
    "IzzyP/laravel-formatter": "2.x"
  }
}

Parsers

All of the following are supported formats that the formatter can read from. * Array * CSV * JSON * XML * YAML, (*6)

Formats

All of the following are formats that are supported for output. * Array * CSV * JSON * XML * YAML, (*7)

General Usage

Including The Formatter, (*8)

use IzzyP\Formatter\Formatter;

Supported Types, (*9)

Formatter::JSON; //json
Formatter::CSV;  //csv
Formatter::XML;  //xml
Formatter::ARR;  //array
Formatter::YAML; //yaml

Making Your First Formatter(s), (*10)

$formatter = Formatter::make($jsonString, Formatter::JSON);
$formatter = Formatter::make($yamlString, Formatter::YAML);
$formatter = Formatter::make($array, Formatter::ARR);
...

Outputting From Your Formatter, (*11)

$csv   = $formatter->toCsv();
$json  = $formatter->toJson();
$xml   = $formatter->toXml();
$array = $formatter->toArray();
$yaml  = $formatter->toYaml();

Deprecated Functionality

The following have been deprecated from the library, however you can easily continue using them in your application, (*12)

Serialized Array, (*13)

$serialized = serialize($formatter->toArray());

PHP Export, (*14)

$export = var_export($formatter->toArray());

The Versions

29/03 2015

dev-master

9999999-dev http://github.com/IzzyP/laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

  Sources   Download

MIT

The Requires

 

laravel csv xml formatter yaml data convert

20/10 2014

2.0

2.0.0.0 http://github.com/SoapBox/laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

  Sources   Download

MIT

The Requires

 

laravel csv xml formatter yaml data convert

19/08 2014

1.4

1.4.0.0 http://github.com/SoapBox/laravel-formatter

A Laravel 4 formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel csv xml formatter yaml data convert

26/03 2014

1.1

1.1.0.0 http://github.com/SoapBox/laravel-formatter

A Laravel 4 formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel csv xml formatter yaml data convert