A lighweight and easy-to-use ORM for CodeIgniter. Gas was built specifically for CodeIgniter app. It uses standard CI DB packages, also take anvantages of its validator class. Gas provide methods that will map your database table and its relation, into accesible object.
1. PHP v.5.3.x
2. CodeIgniter v.2.x.x
All you know from previous version, plus :
1. Supported databases including PDO, if you keep sync with CI repo.
2. Cascade delete.
3. Namespace and PHP5 autoloader.
4. Support composite keys (for key that define relationship).
5. Included phpunit test suite.
$users = Model\User::all();
$some_user = Model\User::limit(10)->find_by_active(1);
$some_user_kid = Model\User::find(1)->kid()->name;
$new_user = Model\User::create($_POST);
// Eager Load
$users = Model\User::with('wife','kid')->all();
$some_user = Model\User::with('wife')->delete();
$user_form = Model\User::html()->find(1)->form('user/edit'); // Generate form edit
$user_table = Model\User::html()->all()->table(); // Generate table
For download or recent update, look at Gas ORM @ GitHub. This library also available at Sparks. For guide and example go to Home of Gas ORM.
1. Im no longer add new feature on old version(1.x), but if you have any issue or bug report on that version, nudge me on this thread.