2017 © Pedro Peláez
 

library mapped

A lightweight data transformation and validation tool.

image

dennis84/mapped

A lightweight data transformation and validation tool.

  • Wednesday, December 9, 2015
  • by dennis84
  • Repository
  • 1 Watchers
  • 1 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Mapped

A lightweight data transformation and validation tool for PHP., (*1)

Build Status Coverage Status, (*2)

Quick Example

<?php

$factory = new Factory;

$mapping = $factory->mapping([
    'username' => $factory->string(),
    'password' => $factory->string(),
], function ($username, $password) {
    return new User($username, $password);
}, function (User $user) {
    return [
        'username' => $user->username,
        'password' => $user->password,
    ];
});

$user = $mapping->apply([
    'username' => 'dennis',
    'password' => 'passwd',
]);

$data = $mapping->unapply($user);

More examples

Mapped has a pretty comprehensive test coverage that demonstrates the whole bunch of functionality., (*3)

The Versions

09/12 2015

dev-master

9999999-dev

A lightweight data transformation and validation tool.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Dennis Dietrich