Exemplo n.º 1
0
 public function __construct($dbInstanceKey = null)
 {
     if ($dbInstanceKey === null) {
         $this->dbInstanceKey = MySqlDbManager::getDefaultInstanceKey();
     } else {
         $this->dbInstanceKey = $dbInstanceKey;
     }
     $this->init();
 }
Exemplo n.º 2
0
 private static function getCallerDbInstanceKey()
 {
     $backtrace = debug_backtrace();
     if (!empty($backtrace[2]['object']) and method_exists($backtrace[2]['object'], 'getDbInstanceKey')) {
         return $backtrace[2]['object']->getDbInstanceKey();
     } else {
         return MySqlDbManager::getDefaultInstanceKey();
     }
 }