The Delima
Creating a model/mapper for every (or near every) table in your database can be a time consuming process. I got rather bored copying/pasting virtually identical models/mappers so I wrote a couple classes that handle the majority of the work for me and add some nifty features.
The Solution
Spiffy_Db_Model, Spiffy_Db_Model_Mapper, and Spiffy_Db_Table provide the basic functionality of your most common model/mapper. Methods such as findByField, find, fetchAll, fetchAllByField, getOptions, setOptions, lastInsertId, select and automatic getters/setters make it simple to start using. All that’s required is you extend the appropriate Spiffy_Db_XXXX_Abstract class and you’re off. The one expectation is that you use a lowercase and underscore spaced naming convention for your tables. i.e., user_id and not UserId.
Getting It
Coming soon… comment if you’re interested.
loading...
