2017 © Pedro Peláez
 

library draperstudio-payload

Serialisers/Deserialisers for several data-types

image

nokimaro/draperstudio-payload

Serialisers/Deserialisers for several data-types

  • Tuesday, October 18, 2016
  • by nokimaro
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Payload

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Install

Via Composer, (*2)

``` bash $ composer require draperstudio/payload, (*3)


## Usage ##### Serialise an input ``` php (new Arr())->serialise($input); (new Csv())->serialise($input); (new Ini())->serialise($input); (new Json())->serialise($input); (new Value())->serialise($input); (new Xml())->serialise($input); (new Yaml())->serialise($input); (new YamlInline())->serialise($input);
Unserialise an input

``` php (new Arr())->unserialise($contents, $class); (new Csv())->unserialise($contents, $class); (new Ini())->unserialise($contents, $class); (new Json())->unserialise($contents, $class); (new Value())->unserialise($contents, $class); (new Xml())->unserialise($contents, $class); (new Yaml())->unserialise($contents, $class);, (*4)


##### Read a file and unserialise its contents ``` php (new Arr())->read($path, $class); (new Csv())->read($path, $class); (new Ini())->read($path, $class); (new Json())->read($path, $class); (new Value())->read($path, $class); (new Xml())->read($path, $class); (new Yaml())->read($path, $class);
Serialise an input and write it into a file

``` php (new Arr())->write($path, $input); (new Csv())->write($path, $input); (new Ini())->write($path, $input); (new Json())->write($path, $input); (new Value())->write($path, $input); (new Xml())->write($path, $input); (new Yaml())->write($path, $input); (new YamlInline())->write($path, $input);, (*5)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*6)

Security

If you discover any security related issues, please email hello@draperstudio.tech instead of using the issue tracker., (*7)

Credits

License

The MIT License (MIT). Please see License File for more information., (*8)

The Versions