dclaysmith/generator

A code generator based on mysql.

v0.1.1 2013-07-09 16:08 UTC

This package is not auto-updated.

Last update: 2024-09-23 11:20:57 UTC


README

"Travis CI Build Status"

Codeship CI Status

Generator is a code generation tool written in PHP. You write templates in PHP but the output can be in any language you desire. You can create ORM layers, administration interfaces, or full CRUD applications.

Generator currently supports MySql but in time should support a number of different relational datasources.

Installation

To install Generator, run the following command from the directory you would like to install Generator:

curl -sSL https://github.com/dclaysmith/generator/releases/v0.1.1/2843/installer | php

Or download generator.phar from the most current release and run:

php generator.phar

Usage

Run Generator:

$ php generator.phar

Workflow

Generator is very useful when starting a new project. I maintain a bootstrap project (link) in my github repository. To begin, I clone my bootstrap repo:

git clone https://github.com/dclaysmith/bootstrap.git

I then run Composer to download any dependencies:

composer.phar install

After creating my initial database, I update my generator.json with the database credentials and run Generator:

generator.phar

Of course database schemas tend to change. If it does, I simply re run the "generate" command.