本文整理汇总了PHP中Zend_Wildfire_Plugin_FirePhp类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Wildfire_Plugin_FirePhp类的具体用法?PHP Zend_Wildfire_Plugin_FirePhp怎么用?PHP Zend_Wildfire_Plugin_FirePhp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Wildfire_Plugin_FirePhp类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: toHTML
/**
* @return string
*/
public function toHTML()
{
\Zend_Wildfire_Plugin_FirePhp::send($this->_root, 'DEBUG', \Zend_Wildfire_Plugin_FirePhp::WARN);
$html = <<<HTML
<ul>
<li>201500000000
<ul>
<li>
<b>
<i>20150000001</i>
</b>
<ul>
<li>20150000002</li>
</ul>
</li>
<li>20150000003</li>
<li>20150000004
<ul>
<li>20150000005
<li>20150000006
<ul>
<li>20150000007</li>
</ul>
</li>
</li>
</ul>
</li>
<li>20150000008</li>
</ul>
</li>
</ul>
HTML;
return $html;
}
开发者ID:sgdoc,项目名称:sgdoce-codigo,代码行数:37,代码来源:Render.php
示例2: __construct
public function __construct()
{
$this->_message = new \Zend_Wildfire_Plugin_FirePhp_TableMessage('Doctrine Queries');
$this->_message->setBuffered(true);
$this->_message->setHeader(array('Time', 'Event', 'Parameters'));
$this->_message->setOption('includeLineNumbers', false);
\Zend_Wildfire_Plugin_FirePhp::getInstance()->send($this->_message, 'Doctrine Queries');
}
开发者ID:raphaeldealmeida,项目名称:Demagogos,代码行数:8,代码来源:FirebugProfiler.php
示例3: tearDown
public function tearDown()
{
if (extension_loaded('pdo_sqlite')) {
$this->_db->getConnection()->exec('DROP TABLE foo');
}
Zend_Wildfire_Channel_HttpHeaders::destroyInstance();
Zend_Wildfire_Plugin_FirePhp::destroyInstance();
}
开发者ID:sasezaki,项目名称:mirror-zf1-tests,代码行数:8,代码来源:FirebugTest.php
示例4: tearDown
public function tearDown()
{
if (extension_loaded('pdo_sqlite') && class_exists('Doctrine_Core')) {
Doctrine_Manager::connection()->getDbh()->exec('DROP TABLE accounts');
}
// unregister doctrine namespace
Zend_Loader_Autoloader::getInstance()->unregisterNamespace('Doctrine_');
Zend_Wildfire_Channel_HttpHeaders::destroyInstance();
Zend_Wildfire_Plugin_FirePhp::destroyInstance();
}
开发者ID:JellyBellyDev,项目名称:zle,代码行数:10,代码来源:DoctrineProfilerFirebugTest.php
示例5: testgroupedloggingAction
public function testgroupedloggingAction()
{
$logger = Zend_Registry::get('logger');
Zend_Wildfire_Plugin_FirePhp::group("Collapsed Group", array('Collapsed' => true));
$logger->log('Message in collapsed group', Zend_Log::DEBUG);
Zend_Wildfire_Plugin_FirePhp::groupEnd();
Zend_Wildfire_Plugin_FirePhp::group("Expanded Group", array('Collapsed' => false));
$logger->log('Message in expanded group', Zend_Log::DEBUG);
Zend_Wildfire_Plugin_FirePhp::groupEnd();
}
开发者ID:MichaelGogeshvili,项目名称:sitewatch,代码行数:10,代码来源:ZendLogWriterFirebugController.php
示例6: testgroupsAction
public function testgroupsAction()
{
Zend_Wildfire_Plugin_FirePhp::group('Group 1');
Zend_Wildfire_Plugin_FirePhp::send('Test Message 1');
Zend_Wildfire_Plugin_FirePhp::group('Group 2');
Zend_Wildfire_Plugin_FirePhp::send('Test Message 2', 'Label', Zend_Wildfire_Plugin_FirePhp::INFO);
Zend_Wildfire_Plugin_FirePhp::groupEnd();
Zend_Wildfire_Plugin_FirePhp::send('Test Message 3');
Zend_Wildfire_Plugin_FirePhp::groupEnd();
}
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:10,代码来源:ZendWildfirePluginFirePhpController.php
示例7: setEnabled
/**
*
* @param boolean $enable
*/
public function setEnabled($enable)
{
parent::setEnabled($enable);
if ($enable) {
$this->_message = new TableMessage($this->label);
$this->_message->setBuffered(true);
$this->_message->setHeader(array('Time', 'Event', 'Parameters', 'Results'));
$this->_message->setDestroy(true);
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($this->_message);
}
}
开发者ID:Tony133,项目名称:zf-web,代码行数:15,代码来源:class.profiler.php
示例8: __construct
/**
* Constructor
*/
public function __construct()
{
$conn = Doctrine_Manager::connection();
$conn->setListener($this->profiler = new Doctrine_Connection_Profiler());
// setup firebug
$this->message = new Zend_Wildfire_Plugin_FirePhp_TableMessage($this->label);
$this->message->setBuffered(true);
$this->message->setHeader(array('Time', 'Event', 'Parameters'));
$this->message->setDestroy(true);
$this->message->setOption('includeLineNumbers', false);
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($this->message);
}
开发者ID:JellyBellyDev,项目名称:zle,代码行数:15,代码来源:DoctrineProfilerFirebug.php
示例9: __construct
/**
* Constructor
*
* @param string $label OPTIONAL Label for the profiling info.
* @return void
*/
public function __construct($label = null)
{
$this->_label = $label;
if (!$this->_label) {
$this->_label = 'Imind_Profiler_Doctrine_Firebug';
}
if (!$this->_message) {
$this->_message = new Zend_Wildfire_Plugin_FirePhp_TableMessage($this->_label);
$this->_message->setBuffered(true);
$this->_message->setHeader(array('Name', 'Time', 'Event', 'Parameters'));
$this->_message->setDestroy(true);
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($this->_message);
}
}
开发者ID:esironal,项目名称:kebab-project,代码行数:20,代码来源:Firebug.php
示例10: setEnabled
/**
* Enable or disable the profiler. If $enable is false, the profiler
* is disabled and will not log any queries sent to it.
*
* @param boolean $enable
* @return Zend_Db_Profiler Provides a fluent interface
*/
public function setEnabled($enable)
{
parent::setEnabled($enable);
if ($this->getEnabled()) {
if (!$this->_message) {
$this->_message = new Zend_Wildfire_Plugin_FirePhp_TableMessage($this->_label);
$this->_message->setBuffered(true);
$this->_message->setHeader(array('Time', 'Event', 'Parameters'));
$this->_message->setDestroy(true);
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($this->_message);
}
} else {
if ($this->_message) {
$this->_message->setDestroy(true);
$this->_message = null;
}
}
return $this;
}
开发者ID:mway08,项目名称:openslopeone,代码行数:26,代码来源:Firebug.php
示例11: display
/**
* Display profiling results and flush output buffer
*
* @param Stat $stat
* @return void
*/
public function display(Stat $stat)
{
$firebugMessage = new \Zend_Wildfire_Plugin_FirePhp_TableMessage($this->_renderCaption());
$firebugMessage->setHeader(array_keys($this->_columns));
foreach ($this->_getTimerIds($stat) as $timerId) {
$row = array();
foreach ($this->_columns as $column) {
$row[] = $this->_renderColumnValue($stat->fetch($timerId, $column), $column);
}
$firebugMessage->addRow($row);
}
\Zend_Wildfire_Plugin_FirePhp::send($firebugMessage);
// setup the wildfire channel
$firebugChannel = \Zend_Wildfire_Channel_HttpHeaders::getInstance();
$firebugChannel->setRequest($this->getRequest());
$firebugChannel->setResponse($this->getResponse());
// flush the wildfire headers into the response object
$firebugChannel->flush();
// send the response headers
$firebugChannel->getResponse()->sendHeaders();
ob_end_flush();
}
开发者ID:,项目名称:,代码行数:28,代码来源:
示例12: display
/**
* Display profiling results and flush output buffer
*/
public function display()
{
$firebugMessage = new Zend_Wildfire_Plugin_FirePhp_TableMessage($this->_renderCaption());
$firebugMessage->setHeader(array_keys($this->_getColumns()));
foreach ($this->_getTimers() as $timerId) {
$row = array();
foreach ($this->_getColumns() as $columnId) {
$row[] = $this->_renderColumnValue($timerId, $columnId);
}
$firebugMessage->addRow($row);
}
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($firebugMessage);
// setup the wildfire channel
$firebugChannel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
$firebugChannel->setRequest($this->_request ? $this->_request : new Zend_Controller_Request_Http());
$firebugChannel->setResponse($this->_response ? $this->_response : new Zend_Controller_Response_Http());
// flush the wildfire headers into the response object
$firebugChannel->flush();
// send the response headers
$firebugChannel->getResponse()->sendHeaders();
ob_end_flush();
}
开发者ID:buttasg,项目名称:cowgirlk,代码行数:25,代码来源:Firebug.php
示例13: _check
public function _check($subject, $controller, $action)
{
$decisions = array();
$object = Zend_Registry::get('userid');
$user = new Evil_Object_Fixed('user', $object);
$role = $user->getValue('role');
$logger = Zend_Registry::get('logger');
Zend_Wildfire_Plugin_FirePhp::group('Access');
$conditions = array('controller', 'action', 'object', 'subject', 'role');
foreach (self::$_rules as $ruleName => $rule) {
$selected = true;
foreach ($conditions as $condition) {
if (isset($rule[$condition])) {
if (is_array($rule[$condition])) {
if (!in_array(${$condition}, $rule[$condition])) {
$selected = false;
break;
}
} elseif ($rule[$condition] != ${$condition}) {
$selected = false;
break;
}
}
}
if ($selected) {
$decisions[(int) $rule['weight']] = $rule['decision'];
$logger->log($ruleName . ' applicable!', Zend_Log::INFO);
}
}
if (count($decisions) > 0) {
$decision = $decisions[max(array_keys($decisions))];
$logger->info('Вердикт: ' . $decision);
} else {
throw new Exception('No rules applicable');
}
Zend_Wildfire_Plugin_FirePhp::groupEnd('Access');
return $decision;
}
开发者ID:nurikk,项目名称:EvilRocketFramework,代码行数:38,代码来源:Weighted.php
示例14: dirname
<?php
require_once dirname(__FILE__) . '/.Start.php';
Zend_Wildfire_Plugin_FirePhp::send(array("Отладочный"), 'UTF-8 characters with json_encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send("Отладочный", 'UTF-8 characters with json_encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send(array('Test work. Проверка работы.'), 'UTF-8 characters with json_encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send('Test work. Проверка работы.', 'UTF-8 characters with json_encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Json::$useBuiltinEncoderDecoder = true;
Zend_Wildfire_Plugin_FirePhp::send(array("Отладочный"), 'UTF-8 characters with Zend_Json_Encoder::encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send("Отладочный", 'UTF-8 characters with Zend_Json_Encoder::encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send(array('Test work. Проверка работы.'), 'UTF-8 characters with Zend_Json_Encoder::encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send('Test work. Проверка работы.', 'UTF-8 characters with Zend_Json_Encoder::encode()', Zend_Wildfire_Plugin_FirePhp::LOG);
require_once dirname(__FILE__) . '/.End.php';
开发者ID:laiello,项目名称:firephp,代码行数:13,代码来源:UTF8.php
示例15: dirname
require_once dirname(__FILE__) . '/.Start.php';
Zend_Wildfire_Plugin_FirePhp::send('Hello World');
/* Defaults to FirePHP::LOG */
Zend_Wildfire_Plugin_FirePhp::send('Log message', '', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send('Info message', '', Zend_Wildfire_Plugin_FirePhp::INFO);
Zend_Wildfire_Plugin_FirePhp::send('Warn message', '', Zend_Wildfire_Plugin_FirePhp::WARN);
Zend_Wildfire_Plugin_FirePhp::send('Error message', '', Zend_Wildfire_Plugin_FirePhp::ERROR);
Zend_Wildfire_Plugin_FirePhp::send('Message with label', 'Label', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send(true, 'Label', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send(false, 'Label', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send(null, 'Label', Zend_Wildfire_Plugin_FirePhp::INFO);
Zend_Wildfire_Plugin_FirePhp::send(1, 'Label', Zend_Wildfire_Plugin_FirePhp::WARN);
Zend_Wildfire_Plugin_FirePhp::send(1.1, 'Label', Zend_Wildfire_Plugin_FirePhp::LOG);
Zend_Wildfire_Plugin_FirePhp::send(array('key1' => 'val1', 'key2' => array(array('v1', 'v2'), 'v3')), 'TestArray', Zend_Wildfire_Plugin_FirePhp::LOG);
function test($Arg1)
{
throw new Exception('Test Exception');
}
try {
test(array('Hello' => 'World'));
} catch (Exception $e) {
/* Log exception including stack trace & variables */
Zend_Wildfire_Plugin_FirePhp::send($e);
}
Zend_Wildfire_Plugin_FirePhp::send('Backtrace to here', '', Zend_Wildfire_Plugin_FirePhp::TRACE);
Zend_Wildfire_Plugin_FirePhp::send(array('2 SQL queries took 0.06 seconds', array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2')))), '', Zend_Wildfire_Plugin_FirePhp::TABLE);
Zend_Wildfire_Plugin_FirePhp::send(array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2'))), '2 SQL queries took 0.06 seconds (Second Table)', Zend_Wildfire_Plugin_FirePhp::TABLE);
Zend_Wildfire_Plugin_FirePhp::send(array("Отладочный"), 'UTF-8 characters', Zend_Wildfire_Plugin_FirePhp::LOG);
/* Will show only in "Server" tab for the request */
Zend_Wildfire_Plugin_FirePhp::send(apache_request_headers(), 'RequestHeaders', Zend_Wildfire_Plugin_FirePhp::DUMP);
require_once dirname(__FILE__) . '/.End.php';
开发者ID:laiello,项目名称:firephp,代码行数:31,代码来源:AdvancedLogging.php
示例16: _constructFirePhp
/**
* Constructs the FirePHP messages.
*
* @param array $profiles
* @param string $label
* @return Zend_Wildfire_Plugin_FirePhp_TableMessage
*/
private function _constructFirePhp(array $columns, $label, $setBuffer = true)
{
$msg = new Zend_Wildfire_Plugin_FirePhp_TableMessage($label);
// If a message is buffered it can be updated for the duration
// of the request and is only flushed at the end of the request.
$msg->setBuffered($setBuffer);
$msg->setHeader($columns);
// Destroy the message to prevent delivery
$msg->setOption('includeLineNumbers', false);
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($msg);
return $msg;
}
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:19,代码来源:MySQLProfiling.php
示例17: getGenerateTime
/**
* getGenerateTime
*
* @access public
* @param strin $aComment
* @param bool $aPrint
* @return string time
*/
public static function getGenerateTime($aComment = "")
{
if (!self::$enabled) {
return;
}
$back = debug_backtrace();
list($msec, $sec) = explode(chr(32), microtime());
list($mTotal, $mSec) = self::getMemoryUsage();
if (!isset(self::$time)) {
self::$time["start"] = $sec + $msec;
self::$time["section"] = $sec + $msec;
self::$timer->addRow(array(sprintf("%01.4f", 0), sprintf("%01.4f", 0), $mSec, $mTotal, $aComment, basename(@$back[0]["file"]) . ':' . @$back[0]["line"]));
} else {
$start = self::$time["section"];
self::$time["section"] = $sec + $msec;
self::$timer->addRow(array(sprintf("%01.4f", round(self::$time["section"] - $start, 4)), sprintf("%01.4f", round(self::$time["section"] - self::$time["start"], 4)), $mSec, $mTotal, $aComment, basename(@$back[0]["file"]) . ':' . @$back[0]["line"]));
}
self::updateMessageLabel();
Zend_Wildfire_Plugin_FirePhp::getInstance()->send(self::$timer);
}
开发者ID:Aktubius,项目名称:zendframeworkmodification,代码行数:28,代码来源:Debug.php
示例18: _write
/**
* Log a message to the Firebug Console.
*
* @param array $event The event data
* @return void
*/
protected function _write($event)
{
if (!$this->getEnabled()) {
return;
}
if (array_key_exists($event['priority'], $this->_priorityStyles)) {
$type = $this->_priorityStyles[$event['priority']];
} else {
$type = $this->_defaultPriorityStyle;
}
$message = $this->_formatter->format($event);
$label = isset($event['firebugLabel']) ? $event['firebugLabel'] : null;
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($message, $label, $type, array('traceOffset' => 6));
}
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:20,代码来源:Firebug.php
示例19: TestObject
static $publicStaticVar = 'Public static Var';
protected $protectedVar = 'Protected Var';
protected static $protectedStaticVar = 'Protected static Var';
private $privateVar = 'PrivateVar';
private static $privateStaticVar = 'Private static Var';
public $publicVar2 = 'Public var 2';
public static $publicStaticVar2 = 'Public static var 2';
private $lotsOfData = "jhsdfjkhsdfjh sdkjhfasjkdhf sakjdhfg skaj dfhsa dfk jhsdfgkjsa dfksadf sadf sadfh\n jksdjhfg sadjkhfsahjdfghja sdfkj sajdfhkgsadfhj sfd jahksdfhjas dfjkahsdfhjasg dfkas df jhasdf ajkshdfgjhkadfs";
}
class TestObject2
{
var $publicVar = 'Public Var';
private $privateVar = 'PrivateVar';
}
class TestObject3
{
}
$obj = new TestObject();
$obj2 = new TestObject2();
$obj3 = new TestObject3();
$obj->child = $obj2;
$obj->child2 = $obj3;
$obj->child3 = $obj;
$obj = array('hello' => 'world', 'obj' => $obj, 'last' => 30, array('foo' => 'bar'), array('first', 'second'));
Zend_Wildfire_Plugin_FirePhp::send($obj, 'Test Object', Zend_Wildfire_Plugin_FirePhp::INFO);
$obj1 = new stdClass();
$obj2 = new stdClass();
$obj1->p = $obj2;
$obj2->p = $obj1;
Zend_Wildfire_Plugin_FirePhp::send($obj1, '$obj1', Zend_Wildfire_Plugin_FirePhp::INFO);
require_once dirname(__FILE__) . '/.End.php';
开发者ID:laiello,项目名称:firephp,代码行数:31,代码来源:ObjectMembers.php
示例20: testFirePhpPluginSubclass
public function testFirePhpPluginSubclass()
{
$firephp = Zend_Wildfire_Plugin_FirePhp::init('Zend_Wildfire_WildfireTest_FirePhpPlugin');
$this->assertEquals(get_class($firephp), 'Zend_Wildfire_WildfireTest_FirePhpPlugin');
Zend_Wildfire_Plugin_FirePhp::destroyInstance();
try {
Zend_Wildfire_Plugin_FirePhp::init('Zend_Wildfire_WildfireTest_Request');
$this->fail('Should not be able to initialize');
} catch (Exception $e) {
// success
}
$this->assertNull(Zend_Wildfire_Plugin_FirePhp::getInstance(true));
try {
Zend_Wildfire_Plugin_FirePhp::init(array());
$this->fail('Should not be able to initialize');
} catch (Exception $e) {
// success
}
$this->assertNull(Zend_Wildfire_Plugin_FirePhp::getInstance(true));
}
开发者ID:lortnus,项目名称:zf1,代码行数:20,代码来源:WildfireTest.php
注:本文中的Zend_Wildfire_Plugin_FirePhp类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论