function smarty_function_chromephp($params, &$smarty) { $var = $params['value']; chromephp::getInstance()->info($params); return ''; //return addslashes( $string ); }
protected function _setInfoToChromePHP() { chromephp::getInstance()->log('Info:'); chromephp::getInstance()->log('SESSION: ', $_SESSION); chromephp::getInstance()->log('SERVER: ', $_SERVER); if (!empty($_GET)) { chromephp::getInstance()->log('GET: ', $_GET); } if (!empty($_POST)) { chromephp::getInstance()->log('POST: ', $_POST); } chromephp::getInstance()->log('-------------------------------------------'); }
/** * Die Methode ist eine abkürzun von chromephp::getInstance() * Mögliche parameter: * chromephp('test') * chromephp('test1', 'test2') * chromephp('test1', 'warn') * chromephp('test1', 'error') * chromephp('test1', 'test2', 'warn') * chromephp('test1', 'test2', 'error') * * @author Rafal Wesolowski <*****@*****.**> * @return void */ function chromephp() { $args = func_get_args(); $iCountArgs = count($args); if ($iCountArgs > 3 || $iCountArgs < 1) { trigger_error("Error func_get_args. function debugphp ", E_USER_ERROR); } elseif ($iCountArgs == 3) { $severity = array_pop($args); } elseif ($iCountArgs == 2) { $severity = array_pop($args); $args[1] = ''; } else { $severity = ''; } chromephp::getInstance()->log($args[0], $args[1], $severity); }
chromephp::getInstance(true)->groupEnd(); } else { if ($iError) { chromephp::getInstance(true)->group('SQL Error!!!'); chromephp::getInstance(true)->error($sql); chromephp::getInstance(true)->info($rs->fields['tracer']); chromephp::getInstance(true)->groupEnd(); } else { chromephp::getInstance(true)->warn($sql); } } } else { $param1 = unserialize($rs->fields['sql1']); $param2 = unserialize($rs->fields['params']); $param1 = is_null($param1) ? '' : $param1; $param2 = is_null($param2) ? '' : $param2; chromephp::getInstance(true)->log($param2, $param1, $rs->fields['type']); } $rs->moveNext(); } } if ($bIfComplete) { //$sLastSql = 'DELETE FROM adodb_debugphp_logsql ORDER BY `id` ASC LIMIT ' . $iLimit; $sLastSql = 'DELETE FROM adodb_debugphp_logsql WHERE `ident` = "' . $sIdent . '" ORDER BY `id` ASC LIMIT ' . $iLimit; } else { //$sLastSql = 'UPDATE adodb_debugphp_logsql SET `check`=1 WHERE `check` is null ORDER BY `id` ASC LIMIT ' . $iLimit; $sLastSql = 'UPDATE adodb_debugphp_logsql SET `check`=1 WHERE `check` is null AND `ident` = "' . $sIdent . '" ORDER BY `id` ASC LIMIT ' . $iLimit; } $oDb->execute($sLastSql); $bResult == true ? chromephp::getInstance(true)->getJsonResult() : die('.');
protected static function _getPhpInstance() { if (is_null(self::$instance) || !self::$instance instanceof self::$sChromeClassName) { self::$instance = new self::$sChromeClassName(); } }
/** * @covers chromephp::getSetting */ public function testgetSetting() { $sKey = 'UnitTest'; $oTestClass = new chromephp(); $this->assertNull($oTestClass->getSetting('123456')); $oTestClass->addSetting($sKey, true); $this->assertTrue($oTestClass->getSetting($sKey)); }