Zend Framework model
Wednesday, October 15th, 2008 - 12:22 pm - Programming, Technology
If you want to enable model to use another than default databas connection, here is a tip:
class Custom extends Zend_Db_Table {
protected $_name = "custom";
public function __construct($config = array()) {
$c = Zend_Registry::get('config');
$db = Zend_Db::factory($c->db->local->adapter,
$c->db->local->config->toArray());
parent::__construct($db);
}
}