DataMapper
DataMapper is an Object Relational Mapper written in PHP for CodeIgniter. It is designed to map your Database tables into easy to work with objects, fully aware of the relationships between each other.
General Features
- Everything is an object!
- Easy to setup, easy to use.
- Custom Validation on object properties.
- Lazy Loading (related objects are only loaded upon access).
- Relations and their integrity are automatically managed for you.
- One to One, One to Many, and Many to Many relations fully supported.
- Select data in the style of Active Record (with or without Method Chaining).
If you are new to DMZ, please start here to get DMZ running on your server. Then follow along with the Next Topic links at the bottom of each page.
If you are an existing DMZ user, you will find changes in new releases and upgrade instructions.
DataMapper OverZealous Edition
DataMapper was originally developed by Simon Stenhouse. The basic design and original development was by him. The OverZealous Edition of DataMapper came from a desire to continue to enhance and develop DataMapper, and has been developed and maintained by Phil DeJarnett. DMZ is a near drop-in replacement if you are already using DataMapper 1.6.0 (and possibly older versions).
Some of the enhancements to the original DataMapper include:
- In-table foreign-keys for singular relationships.
- The ability to view, edit, and query using extra columns on relationship join tables.
- The ability to include data from singularly related objects.
- The ability to query and include data from deep relationships.
- Significantly enhanced relationships, including multiple relationships between the same objects.
- The ability to extend DMZ through simple classes, and share those extensions.
- Lots of little improvements, such as default ordering, saving objects with existing ids, query grouping, performance improvements, and much more.
If you would like to upgrade to DMZ from DataMapper, please see the upgrade guide.
Giving Back
If you like DMZ and want to give back, there are several options:
- My favorite would be to send me a postcard (or other small souvenir) from where-ever you live!
- Contribute MIT-licensed (or similar) Extensions that can be included with the default DMZ distribution. See this page for contact info.
- Help provide feedback and support on the CodeIgniter Forums
(I am not currently accepting donations.)