Codeigniter: how to create custom active record methods? like methods in the core, DB_active_rec.php -
the main requirement is: want create reusable component or function allow me database queries , specify database(group), maybe in argument.
but now, maybe simple 1 following enough:
$this->db->get_all_by_specific_db('tablename',$config['group1']);
//where $config['group1'] database configuration of specific database want data table specified. i'm saying "specific database", since used many database if it's entity, , grow more in number scale
do have suggestion meet requirement? workarounds? etc. or maybe there existing api or documentation(specifically in db_active_rec.php) codeigniter team did missed find it. suggestions, links, tutorial or other resources (maybe further study on php designing , oop stuffs meet highly appreciated.
ps: im using pyrocms, believe php or codeigniter implementations may address one.