Skip to content

vsmoraes/dynamo-mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamoDB Mapper

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

A simple wrapper so you can use your own entities with dynamodb

Instalation

The package is available on Packagist. Autoloading is PSR-4 compatible.

composer require vsmoraes/dynamo-mapper

Or add it directly to you composer.json file

{
    "require": {
        "vsmoraes/dynamo-mapper": "dev-master"
    }
}

Usage

$data = [
    'id' => ['N' => '1'],
    'name' => ['S' => 'Foo'],
    'gender' => ['S' => 'male'],
    'active' => ['BOOL' => true]
];

$entity = (new Mapper(new Factory()))->getFilledEntity(new Person(), $data);
$entity = (new Person())->setId(1)
    ->setName('Foo');
$entity->gender = 'male';

$dynamoEntry = (new Mapper(new Factory()))->getEntityData($entity);

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages