Horde_Imap_Client_Base_Debug::_write PHP Method

_write() protected method

Write debug information to the output stream.
protected _write ( string $msg, $pre = null )
$msg string Debug data.
    protected function _write($msg, $pre = null)
    {
        if (!$this->debug || !$this->_stream) {
            return;
        }
        if (!is_null($pre)) {
            $new_time = microtime(true);
            if (is_null($this->_time)) {
                fwrite($this->_stream, str_repeat('-', 30) . "\n" . '>> ' . date('r') . "\n");
            } elseif (($diff = $new_time - $this->_time) > self::SLOW_CMD) {
                fwrite($this->_stream, '>> Slow Command: ' . round($diff, 3) . " seconds\n");
            }
            $this->_time = $new_time;
        }
        fwrite($this->_stream, $pre . $msg);
    }