programster/orm-generator

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

This package automates the creation of the table and object files for each of your database tables when you are using the iRAP/MysqlObjects package.

0.1.0 2018-12-31 18:05 UTC

This package is not auto-updated.

Last update: 2021-06-16 04:52:16 UTC


README

This package is here to take the tediousness out of having to create a table and object file for each of your database tables when you are using the iRAP/MysqlObjects package.

Usage

Write a small script to load the database setings and specify where the generated files should be put. For example:

$db = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$generator = new \Programster\OrmGenerator\Generator($db, __DIR__ . '/output');
$generator->run();

After you execute the script, navigate to that folder and you should see a table and object file for each of your database's tables.