idrinth/entity-generator

Generates entities from a given database.


Keywords
database, generates-entities
License
MIT

Documentation

EntityGenerator

Generates entities from a given database and provides optional handling of them.

Checks

Travis php 5.3-7.1: Travis Status

Codacy: Codacy Badge Codacy Badge

Codeclimate: Issue Count Code Climate

Example

<?php
//generate entities for a schema named test and a schema named tester
//existance an autoloader is expected
$generator =  new \De\Idrinth\EntityGenerator\EntityGenerator(
                new \PDO('mysql:host:localhost', 'root', ''),
                __DIR__.DIRECTORY_SEPARATOR.'{{schema}}',
                'De\Idrinth\EntityGenerator\Test'
            );
$object->run(array('test','tester'));