Run scaffolding or model generation based an an existing database tables.

Based on https://github.com/mp-php/fuel-myapp/blob/master/tasks/scafdb.php

author Mamoru Otsuka http://madroom-project.blogspot.jp/
copyright 2012 Mamoru Otsuka
license WTFPL http://sam.zoy.org/wtfpl/COPYING

 Methods

Class initialization

__construct() 

Show help.

help() 

Usage (from command line):

php oil refine fromdb:help

Generate migrations for a database table.

migration($tables) 

Usage (from command line):

php oil refine fromdb:migration <table_name,table_name...>

Parameters

$tables

Generate model for a database table.

model($tables) 

Usage (from command line):

php oil refine fromdb:model <table_name,table_name...>

Parameters

$tables

Show help.

run() 

Usage (from command line):

php oil refine fromdb

Generate scaffold for a database table.

scaffold($tables) 

Usage (from command line):

php oil refine fromdb:scaffold <table_name,table_name...>

Parameters

$tables

Construct the argument list

arguments(string $table, $type) : array

Parameters

$table

string

name of the database table we need to create the list for

$type

Returns

array

Construct the list of tables

fetch_tables(string $type) : array

Parameters

$type

string

type of action being called, used to display a customized message

Returns

array