Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples add option to generate phpdoc properties (#3) Mar 1, 2019
src fix build/remove typo line May 15, 2019
.gitignore refactoring, add qa and phpstan Feb 23, 2019
.travis.yml add travis build (#1) Feb 23, 2019
composer.json add basic property generator unit test (#4) Mar 1, 2019
phpstan.neon refactoring, add qa and phpstan Feb 23, 2019

Entity generator

Typed entity generator from database. It can generate entities for whole database, table/view and from query

Latest Stable Version Build Status codecov PHPStan Total Downloads License


$ composer require dodo-it/entity-generator


$config = new \DodoIt\EntityGenerator\Generator\Config([
    'path' =>  __DIR__ . '/Entities',
    'extends' => \Examples\Pdo\Entities\Entity::class,
    'namespace' => 'Examples\Pdo\Entities'

$pdo = new \PDO('mysql:dbname=example;host=', 'root', '');

$generatorFactory = new \DodoIt\EntityGenerator\Factory\GeneratorPdoFactory($pdo);
$generator = $generatorFactory->create($config);

see example folder

You can add your own methods to entities and change getter/setter functions, they won't be overriden when regenerated


see src/Generator/Config.php

You can’t perform that action at this time.