2017 © Pedro Peláez
 

library transformer

Simple library for API transformation in declarative way

image

oberonus/transformer

Simple library for API transformation in declarative way

  • Monday, August 28, 2017
  • by oberonus
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Oberonus API Transformer

Contents

Installation

To install Transformer run the command:, (*1)

composer require oberonus/transformer

Quick Start

Declare child class from Oberon\Transform:, (*2)

use Oberonus\Transformer;

class MyTransformer extends Transformer {

    //fields list to transform
    protected $fields = ['one', 'two'];

    //converting rules
    protected $converters = [
        'one' => [\Oberonus\Transformer\Transformer::RENAME, 'renamed_one']
    ];
}

Now it's easy to process transformations:, (*3)

$transformer = new MyTransformer;
$result = $transformer->transform(['one' => 1, 'two' => 2]);

And result will be:, (*4)

[
    "renamed_one" => 1,
    "two" => 2
]

The Versions

28/08 2017

dev-master

9999999-dev

Simple library for API transformation in declarative way

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Alexander Demin

api php serializer psr7 response functional transformer declarative

28/08 2017

0.1.2

0.1.2.0

Simple library for API transformation in declarative way

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Alexander Demin

api php serializer psr7 response functional transformer declarative

26/07 2017

0.1.1

0.1.1.0

Simple library for API transformation in declarative way

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Alexander Demin

api php serializer psr7 response functional transformer declarative

26/07 2017

0.1

0.1.0.0

Simple library for API transformation

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Alexander Demin

api php serializer psr7 response transformer