My patch to make DataMapper work with CI 2.0.3 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: My patch to make DataMapper work with CI 2.0.3 (/showthread.php?tid=45758) |
My patch to make DataMapper work with CI 2.0.3 - El Forum - 10-04-2011 [eluser]mikelexp[/eluser] This is my patch to be able to use DataMapper with CI 2.0.3. It's really basic but it seems to be working fine. First, edit system/database/DB.php. Lines 127 and 128 should look like this: Code: require_once(APPPATH.'core/MY_DB_active_record.php'); // new line Finally, save this code as <application_folder>/core/MY_DB_active_record.php: Code: <?php (defined('BASEPATH')) OR exit('No direct script access allowed'); That's it. I'm extending CI_DB_active_record to make its protected methods public so DataMapper can access them. But I'm no CI guru so maybe more experienced coders will find potential problems. |