library mapped
A lightweight data transformation and validation tool.
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
Mapped
A lightweight data transformation and validation tool for PHP., (*1)
, (*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)
dev-master
9999999-dev
A lightweight data transformation and validation tool.
Sources
Download
MIT
The Requires
The Development Requires
by
Dennis Dietrich