Search code examples
phpcodeigniterormframeworks

Which is the best PHP ORM for codeigniter?


Which would be the best ORM for the codeigniter framework. I saw some similar questions but it was too old and the link didn't work. Can anyone help me out with this?


Solution

  • DataMapper

    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.

    Website: http://datamapper.wanwizard.eu/

    Gas ORM

    A lightweight and easy-to-use ORM for CodeIgniter. Gas was built specifically for CodeIgniter app. It uses CodeIgniter Database packages, a powerful DBAL which support numerous DB drivers. Gas ORM provide a set of methods that will map your database tables and its relationship, into accessible object.

    Website: https://github.com/toopay/gas-orm

    Doctrine

    Website: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/

    NOTE: You must do some workaround to integrate this with CI, try here.

    EDIT: Doctrine, integrating with CodeIgniter (working URL). This might not work for all CodeIgniter versions and may require slight adjustments.