/** * &_debug() * * @access private * @param string &$sBuff * @return string */ function &_debug(&$sBuff) { if (BLOCKEN_DEBUG_MODE && (BLOCKEN_ALWAYS_DEBUG || BlockenCommon::isMember())) { $this->_fEnd = BlockenCommon::getMicroTime(); $fTakeTime = $this->_fEnd - $this->_fStart; if ($this->_bIsDebug) { $sDebug = sprintf("\n<br />take time %01.03f sec.<br />\n", $fTakeTime); $sDebug .= sprintf("<pre>\n\$aryParam = %s\n</pre>\n", var_export($this->_aryParam, true)); if (BLOCKEN_TIME_OVER < $fTakeTime) { $sDebug .= sprintf("<script language=\"JavaScript\"><!--\nalert(\"take time %01.03f sec.\");\n// --></script>\n", $fiTakeTime); } $sBuff = preg_replace('/<\\/body>/i', "{$sDebug}\n</body>", $sBuff); if ($this->_bCacheHit) { $sBuff = preg_replace('/<body(.*)>/i', "<body\\1>\n(Cache Hit)<br />", $sBuff); } } else { $sDebug = sprintf("<!--\ntake time %01.03f sec.\n\n\$aryParam = %s\n-->\n", $fTakeTime, var_export($this->_aryParam, true)); $sBuff .= $sDebug; } } return $sBuff; }