• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Wildfire_Plugin_FirePhp_TableMessage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Zend_Wildfire_Plugin_FirePhp_TableMessage的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Wildfire_Plugin_FirePhp_TableMessage类的具体用法?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage怎么用?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Zend_Wildfire_Plugin_FirePhp_TableMessage类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: log

 public static function log($message, $levl = Zend_Log::INFO, $data = null)
 {
     if (Zend_Registry::isRegistered('logger')) {
         $logger = Zend_Registry::get('logger');
         /**
          * прислали что то на вардамп
          */
         if (null != $data) {
             /**
              * 
              * сделаем табличку
              * @var unknown_type
              */
             $_message = new Zend_Wildfire_Plugin_FirePhp_TableMessage($message);
             $_message->setHeader(array('Data'));
             $_message->addRow(array($data));
             $logger->log($_message, $levl);
         } else {
             $logger->log($message, $levl, $extras);
         }
     }
 }
开发者ID:nurikk,项目名称:EvilRocketFramework,代码行数:22,代码来源:Log.php


示例2: 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


示例3: debug

 /**
  * dump
  *
  * @return string
  */
 public static function debug()
 {
     $backtrace = debug_backtrace();
     // get variable name
     $arrLines = file($backtrace[0]["file"]);
     $code = $arrLines[$backtrace[0]["line"] - 1];
     $arrMatches = array();
     // find call to Sys::dump
     preg_match('/\\b\\s*Core_Debug::debug\\s*\\(\\s*(.+)\\s*\\);\\s*/i', $code, $arrMatches);
     $varName = isset($arrMatches[1]) ? $arrMatches[1] : '???';
     $trace = array();
     foreach ($backtrace as $rec) {
         if (isset($rec['function'])) {
             $t['call'] = '';
             if (isset($rec['class'])) {
                 $t['call'] .= $rec['class'] . $rec['type'] . $rec['function'];
             } else {
                 $t['call'] .= $rec['function'];
             }
             $t['call'] .= '(';
             if (sizeof($rec['args'])) {
                 foreach ($rec['args'] as $arg) {
                     if (is_object($arg)) {
                         $t['call'] .= get_class($arg);
                     } else {
                         $arg = str_replace("\n", ' ', (string) $arg);
                         $t['call'] .= '"' . (strlen($arg) <= 30 ? $arg : substr($arg, 0, 25) . '[...]') . '"';
                     }
                     $t['call'] .= ', ';
                 }
                 $t['call'] = substr($t['call'], 0, -2);
             }
             $t['call'] .= ")";
         }
         $t['file'] = @$rec['file'] . ':' . @$rec['line'];
         $trace[] = $t;
     }
     $debug = new Zend_Wildfire_Plugin_FirePhp_TableMessage('Debug');
     $debug->setBuffered(true);
     $debug->setHeader(array('Value and BackTrace'));
     $debug->setOption('includeLineNumbers', false);
     foreach (func_get_args() as $var) {
         $debug->addRow(array($var));
     }
     $debug->addRow(array($trace));
     $where = basename($backtrace[0]["file"]) . ':' . $backtrace[0]["line"];
     $debug->setLabel("Debug: {$varName} ({$where})");
     Zend_Wildfire_Plugin_FirePhp::getInstance()->send($debug);
 }
开发者ID:Aktubius,项目名称:zendframeworkmodification,代码行数:54,代码来源:Debug.php


示例4: _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


示例5: testTableMessage2

 /**
  * @group ZF-6396
  */
 public function testTableMessage2()
 {
     $this->_setupWithoutFrontController();
     $channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
     $protocol = $channel->getProtocol(Zend_Wildfire_Plugin_FirePhp::PROTOCOL_URI);
     $table = new Zend_Wildfire_Plugin_FirePhp_TableMessage('TestMessage');
     $table->setHeader(array('col1', 'col2'));
     $table->setBuffered(true);
     Zend_Wildfire_Plugin_FirePhp::send($table);
     $cell = new ArrayObject();
     $cell->append("item1");
     $cell->append("item2");
     $table->addRow(array("row1", $cell));
     Zend_Wildfire_Channel_HttpHeaders::getInstance()->flush();
     $messages = $protocol->getMessages();
     $this->assertEquals($messages[Zend_Wildfire_Plugin_FirePhp::STRUCTURE_URI_FIREBUGCONSOLE][Zend_Wildfire_Plugin_FirePhp::PLUGIN_URI][0], '[{"Type":"TABLE","Label":"TestMessage"},[["col1","col2"],["row1",{"__className":"ArrayObject","undeclared:0":"item1","undeclared:1":"item2"}]]]');
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:20,代码来源:WildfireTest.php


示例6: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $html = '<h4>Registered Instances</h4>';
     $this->_registry->ksort();
     foreach ($this->_registry as $k => $v) {
         if (is_object($v)) {
             $this->message->addRow(array($k, get_class($v)));
         } else {
             $this->message->addRow(array($k, $v));
         }
     }
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:17,代码来源:Registry.php


示例7: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $username = 'Not Authed';
     $role = 'Unknown Role';
     if ($this->_auth->hasIdentity()) {
         foreach ($this->_auth->getIdentity() as $property => $value) {
             $this->message->addRow(array((string) $property, (string) $value));
         }
     } else {
         //			$this->message->setMessage('Not authorized');
     }
     return '';
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:18,代码来源:Auth.php


示例8: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $this->_request = Zend_Controller_Front::getInstance()->getRequest();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewVars = $viewRenderer->view->getVars();
     foreach ($viewVars as $k => $v) {
         $this->message->addRow(array($k . " - View", self::_cleanData($v)));
     }
     foreach ($this->_request->getParams() as $k => $v) {
         $this->message->addRow(array($k . " - Parameter", self::_cleanData($v)));
     }
     foreach ($this->_request->getCookie() as $k => $v) {
         $this->message->addRow(array($k . " - Cookie", self::_cleanData($v)));
     }
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:20,代码来源:Variables.php


示例9: updateMessageLabel

 /**
  * Update the label of the message holding the profile info.
  * 
  * @return void
  */
 protected function updateMessageLabel()
 {
     if (!$this->_message) {
         return;
     }
     $this->_message->setLabel($this->_label . ' (' . round($this->_totalElapsedTime, 5) . ' sec)');
 }
开发者ID:esironal,项目名称:kebab-project,代码行数:12,代码来源:Firebug.php


示例10: updateMessageLabel

 /**
  * Update the label of the message holding the profile info.
  *
  * @return void
  */
 protected function updateMessageLabel()
 {
     if (!$this->_message) {
         return;
     }
     $this->_message->setLabel(str_replace(array('%label%', '%totalCount%', '%totalDuration%'), array($this->_label, $this->getTotalNumQueries(), (string) round($this->_totalElapsedTime, 5)), $this->_label_template));
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:12,代码来源:Firebug.php


示例11: _updateMessageLabel

 /**
  * Update the label of the message holding the profile info.
  *
  * @return void
  */
 protected function _updateMessageLabel()
 {
     if (!$this->_message) {
         return;
     }
     $search = array('%label%', '%totalCount%', '%totalDuration%');
     $replacements = array($this->_label, $this->_queryCount, (string) round($this->_totalElapsedTime, 5));
     $label = str_replace($search, $replacements, $this->_label_template);
     $this->_message->setLabel($label);
 }
开发者ID:exstas87,项目名称:bgylibrary,代码行数:15,代码来源:Firebug.php


示例12: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $included = $this->_getIncludedFiles();
     $libraryFiles = array();
     foreach ($included as $file) {
         $file = str_replace($this->_basePath, '', $file);
         $this->message->addRow(array($file));
     }
     $this->message->addRow($libraryFiles);
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:15,代码来源:File.php


示例13: getPanel

 /**
  * Gets content panel for the Debugbar
  *
  * @return string
  */
 public function getPanel()
 {
     $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();
     $this->message->setMessage(round(strlen($body) / 1024, 2) . 'K');
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:10,代码来源:Html.php


示例14: setPanel

 /**
  * Sets panel content
  *
  * @param string $panel
  * @return ZFirebug_Controller_Plugin_Debug_Plugin_Text Provides a fluent interface
  */
 public function setPanel($panel)
 {
     $this->_panel = $panel;
     $this->message->setMessage($panel);
     return $this;
 }
开发者ID:vahid-sohrabloo,项目名称:ZFirebug,代码行数:12,代码来源:Text.php


示例15: updateMessageLabel

 /**
  * Update the label of the message holding the profile info.
  *
  * @return void
  */
 protected static function updateMessageLabel()
 {
     self::$_timer->setLabel(sprintf('Timer (%s sec @  %s Kb)', round(self::$_time["section"] - self::$_time["start"], 4), number_format(self::$_memory / 1024, 2, '.', ' ')));
 }
开发者ID:shahmaulik,项目名称:zfcore,代码行数:9,代码来源:Debug.php


示例16: updateMessageLabel

 /**
  * Update the label of the message holding the profile info.
  *
  * @return void
  */
 protected function updateMessageLabel()
 {
     $this->message->setLabel(str_replace(array('%label%', '%totalCount%', '%totalDuration%'), array($this->label, $this->totalNumQueries, (string) round($this->totalElapsedTime, 5)), $this->label_template));
 }
开发者ID:JellyBellyDev,项目名称:zle,代码行数:9,代码来源:DoctrineProfilerFirebug.php


示例17: updateLabel

 /**
  * Sets the label for the FireBug entry
  */
 public function updateLabel()
 {
     $this->_message->setLabel(sprintf('Doctrine Queries (%d @ %f sec)', $this->_queryCount, number_format($this->_totalMS, 5)));
 }
开发者ID:raphaeldealmeida,项目名称:Demagogos,代码行数:7,代码来源:FirebugProfiler.php



注:本文中的Zend_Wildfire_Plugin_FirePhp_TableMessage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_XmlRpc_Client类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Wildfire_Plugin_FirePhp类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap