Skip to content

farrelley/Zend-Db-Model-Creation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Use at your own risk! :-)

This script creates generates generic stubs of DbTable, Model, and Mapper files for Zend Framework.  It's a dirty script to get up and running quickly.
Eventually I hope to get this into a Zend_Tool Provider.

What the script does.
Uses your default database adapter from your .ini file.
Reads the databse tables and creates the files.

This has to be run in an action and then can be removed.

Create DbTables -> $db = new My_Scripts_DbTable();
Create Models -> $db = new My_Scripts_DbModel();
Create Mappers -> $db = new My_Scripts_DbMapper();

Then just run the action.  This will create the mapper and DbTable directory if needed.
The models folder must already be there.
You might have to change the models dir to be writable by the web server.

This is intended to get you about 85% - 90% there.  Not a 100% solution.  

Add tickets if you see something wrong @ http://github.com/farrelley/Zend-Db-Model-Creation/issues


-- 03/30/2010
1. The scripts now use application namespace instead of Application_  You must have a config file in application/configs/ named application.ini with appnamespace = "something here"


Shaun Farrell

About

Script to Create Project Models, DbTables, and Mappers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages