Beispiel #1
0
 protected function _initConnection()
 {
     $this->bootstrap('db');
     $resource = $this->getResource('db');
     Zend_Registry::set('db', $resource);
     if (Installer_Model_Installer::isInstalled()) {
         try {
             $default = new Core_Model_Db_Table();
             $default->checkConnection();
         } catch (Exception $e) {
             $logger = Zend_Registry::get("logger");
             $logger->sendException("Fatal Error When Connecting to The Database: \n" . print_r($e, true));
         }
     }
 }
Beispiel #2
0
 public function findAll($values, $order, $params)
 {
     if (is_null($order)) {
         $order = 'position ASC';
     }
     return parent::findAll($values, $order, $params);
 }
Beispiel #3
0
 public function findAll($values, $order, $params)
 {
     $rows = parent::findAll($values, $order, $params);
     foreach ($rows as $row) {
         $row->prepareUri();
     }
     return $rows;
 }
Beispiel #4
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     try {
         $this->_db->describeTable($this->_name);
     } catch (Exception $e) {
         $this->_is_installed = false;
     }
     return $this;
 }