notes on converting old db_oo code to DB_DataObjects

In the process of moving db_oo into pear it was neccessary to change the API, primarily to use studlycaps rather than under_scored_names. below is a list of the old db_oo methods and what they are now called.

Original New Description/Notes
- - Configuration has changed from using a class to define the database to a ini file system- this should be faster, see the config builder chapter in the manual
db_oo DB_DataObject as the name of the core object has changed - you will have to make a few changes to any old classes that inherited from db_oo,
The Builder routine (createTables.php) will replace the xxxx extends yyyy { line, however it will leave alone the require line, you will either have to have a one line db_oo file saying "require_once('DB_DataObject')" or go in and change this manually.
- - Autobuilder now lists the tables rows as vars for reference.
db_oo::_static_get() DB_DataObject::staticGet() The base static get method now autoloads tables
::static_get() ::staticGet() _ to StudlyCaps
::select_add($string) ::selectAdd($string) _ to StudlyCaps
::select_reset() ::selectAdd() calling selectAdd without arguments resets the select data
::condition_append() ::whereAdd() _ to StudlyCaps  - and a more logical name
::order_by() ::orderBy() _ to StudlyCaps
::group_by() ::groupBy() _ to StudlyCaps 
::set_from_array() ::setFrom() _ to StudlyCaps - setFrom accepts an Object or Array
::copydown() ::setFrom() _ to StudlyCaps - setFrom accepts an Object or Array
db_oo::debug_on() DB_DataObject::debugLevel() _ to StudlyCaps - also turns on/off debugging
db_oo::__*() All private methods that used to be called /relayed if you replace the key ones like fetch(), etc. can use the standard parent::fetch(), or just DB_DataObject::fetch();

Add a comment (requires javascript!)

Name
Email
Homepage
Comment
 

Edit Document | Create Page:
Contact me at alan@akbkhome.com