Exemplo n.º 1
0
 /** @return ErrorHandler */
 public static function getHandler($callback, $data = null, $register = true)
 {
     if (self::$_poolLength) {
         $h = array_pop(self::$_pool);
         self::$_poolLength--;
     } else {
         $h = new ErrorHandler();
     }
     $h->_callback = $callback;
     $h->data = $data;
     if ($register) {
         $h->register();
     }
     return $h;
 }
Exemplo n.º 2
0
 public function useExistingConnection($connection)
 {
     $this->_connection = $connection;
     $this->_errorHandler = ErrorHandler::getHandler(array($this, 'onError'), null, false);
 }
Exemplo n.º 3
0
 protected function _destroy()
 {
     $this->_errorHandler->destroy();
     $this->_errorHandler = null;
 }