Пример #1
0
 /**
  * Perform any necessary shutdown tasks.
  * This should only be invoked as a register_shutdown callback.
  *
  * @access private
  */
 function _shutdown()
 {
     if (isset($this->_lockSystem)) {
         /* Bitch about open locks */
         $lockIds = $this->_lockSystem->getLockIds();
         foreach ($lockIds as $lockId) {
             if ($this->getDebug()) {
                 $this->debug(sprintf('Lock id %d was left hanging!', $lockId));
             }
         }
         /* Release all locks and ignore any errors */
         $this->_lockSystem->releaseAllLocks();
         $this->_lockSystem->releaseQueue();
     }
     /* Roll back any transactions */
     if (isset($this->_storage)) {
         $this->_storage->rollbackTransaction();
     }
 }
Пример #2
0
 /**
  * Stop recording the debug snippet and return whatever got recorded.
  * @return string the snippet
  */
 function stopRecordingDebugSnippet()
 {
     $this->_debugSnippetActive = false;
     $tmp = $this->_debugSnippet;
     $this->_debugSnippet = '';
     if (isset($this->_storage) && !$this->_debug) {
         $this->_storage->setDebug(false);
     }
     return $tmp;
 }