Description

DB_OO2 maps relational tables from a traditional relational database onto PHP objects. Each database table is represented by a proxy object. This object provides methods for setting object fields (which match the table columns), methods for creating, updating and dropping rows. Further, each object provides methods to retrieve record sets, navigate around the record set and, naturally, changing each record set row.

Unlike PEAR's DB_DataObject, DB_OO2 does away with package configuration. All necessary information is extracted from the database catalog. This approach also means that, unlike RoR's ActiveRecord, DB_OO2 imposes no conventions on the database schema.

DB_OO2 was proposed for inclusion in PEAR, but rejected due to the no-collision policy (its purpose collides with DB_DataObject's).

Currently, only postgresql is supported as a backend. Supporting different backends requires writing the catalog query class, which for postgresql is about 300 lines long (Help supporting different backends is greatly appreciated).

Download

Download at http://pear.sergiocarvalho.com/repository/DB_OO2-1.0.0.tgz
Documentation at http://pear.sergiocarvalho.com/docs/DB_OO2-1.0.0/
Browse source code at http://pear.sergiocarvalho.com/browse/DB_OO2-1.0.0
Install with: pear install sergiosgc/DB_OO2