Version 32, last updated by Anonymous at July 12, 2009 12:43 UTC

IgnitedRecord

What is IgnitedRecord?

IgnitedRecord is a relation handling ORM[1] library, made for the PHP framework CodeIgniter.

The goal of IgnitedRecord is to provide an easy to use, easily customizeable, ORM library to CodeIgniter.

Features at a glance

  • Easily configurable
  • Uses default values if settings are not explicitly set
  • Relations:
    • Belongs to
    • Has Many
    • Has One
    • Has And Belongs To Many (shorted to habtm)
  • When fetching related objects, it is possible to filter, order and modify the query in a large quantity of ways
  • Belongs To and Has One relations can be fetched easily through a JOIN with the help of join_related()
  • Behaviours, which can add and modify the functionality of IgnitedRecord
  • Hooks and triggers where you can put your own code
  • Complete support for PHP 4, no "hacks" or anyting else is required for IgintedRecord to work under PHP 4.
  • Method Chaining under PHP 5
  • Nested WHERE statements and subqueries, with help from IgnitedQuery
  • Partial support for multiple primary keys (relations are not supported, yet)

Benefits

  • Repetitious work is minimized.
  • You have a finished model base to builld on.
  • You don't have to write SQL if you don't want to.
  • The choice between updates and inserts is automatically determined.
  • The result resources are automatically cleaned up, to improve speed and lower memory consumption.
  • The code is easier to read, take this as an example:
    $posts = $user->related('posts')->order_by('name', 'desc')->get();
    // instead of:
    $posts = $this->db->from('posts')->where('user_id', $user->id)->order_by('name', 'desc')->get()->result();
    The difference will be even more obvious when more advanced queries are used.

Where can I find more information?

Here is a 20 minutes long introductory screencast which shows how easily a basic blog can be built with CodeIgniter and IgnitedRecord.

You also can check the IgnitedRecord_Manual or you can look in the CodeIgniter Forum: IgnitedRecord Forum Thread

Where can I get it?

You can either access the SVN Assembla provides here, or you can fetch a prepackaged zip file here.

The SVN is the most up to date, but the trunk version is subject to change (it may contain bugs, partial features and other non finished details).