Skip to content

Generates ready-to-use model classes for netresearch/jsonmapper.

License

Notifications You must be signed in to change notification settings

kiss-my/JsonMapper-Model-Generator

Repository files navigation

JsonMapper Model Generator

Build Status PHP from Packagist Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require faustbrian/jsonmapper-model-generator

Usage

<?php

require_once 'vendor/autoload.php';

use BrianFaust\JsonMapper\Generator;

$model = new Generator('Vendor\Package', 'ClassName', [
    'userId' => 1,
    'id' => 1,
    'title' => 'sunt aut facere repellat provident occaecati excepturi optio reprehenderit',
    'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt nemo earum, blanditiis harum aliquam minus id repellendus quia libero expedita itaque beatae et voluptate pariatur eos, voluptatem, saepe inventore tempora!',
    'created_at' => '2015-08-01 18:34:01',
]);

echo($model->output());

Testing

$ phpunit

Security

If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

Credits

License

MIT © Brian Faust

About

Generates ready-to-use model classes for netresearch/jsonmapper.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages