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

PHP FireCake类代码示例

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

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



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

示例1: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('log', false);
     $this->firecake = FireCake::getInstance('TestFireCake');
     TestFireCake::reset();
 }
开发者ID:juliocp88,项目名称:cakephp-example,代码行数:12,代码来源:DebugKitDebuggerTest.php


示例2: startCase

 /**
  * start Case - switch view paths
  *
  * @return void
  **/
 function startCase()
 {
     $this->_viewPaths = Configure::read('viewPaths');
     Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS, APP . 'plugins' . DS . 'debug_kit' . DS . 'views' . DS, ROOT . DS . LIBS . 'view' . DS));
     $this->_debug = Configure::read('debug');
     $this->firecake =& FireCake::getInstance();
 }
开发者ID:afzet,项目名称:cake-cart,代码行数:12,代码来源:fire_php_toobar.test.php


示例3: table

 /**
  * Generate a table with FireCake
  *
  * @param array $rows Rows to print
  * @param array $headers Headers for table
  * @param array $options Additional options and params
  * @return void
  */
 function table($rows, $headers, $options = array())
 {
     $title = $headers[0];
     if (isset($options['title'])) {
         $title = $options['title'];
     }
     array_unshift($rows, $headers);
     FireCake::table($title, $rows);
 }
开发者ID:kondrat,项目名称:agift,代码行数:17,代码来源:fire_php_toolbar.php


示例4: setUp

 /**
  * setUp
  *
  * @return void
  **/
 public function setUp()
 {
     parent::setUp();
     Router::connect('/:controller/:action');
     Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
     Router::parse('/');
     $this->Controller = new Controller($this->getMock('CakeRequest'), new CakeResponse());
     $this->View = new View($this->Controller);
     $this->Toolbar = new ToolbarHelper($this->View, array('output' => 'DebugKit.FirePhpToolbar'));
     $this->Toolbar->FirePhpToolbar = new FirePhpToolbarHelper($this->View);
     $this->firecake = FireCake::getInstance();
 }
开发者ID:cc2i,项目名称:calibrephp,代码行数:17,代码来源:FirePhpToolbarHelperTest.php


示例5: testOutput

 /**
  * test output switch to firePHP
  *
  * @return void
  */
 public function testOutput()
 {
     $firecake = FireCake::getInstance('TestFireCake');
     Debugger::getInstance('DebugKitDebugger');
     Debugger::addFormat('fb', array('callback' => 'DebugKitDebugger::fireError'));
     Debugger::output('fb');
     set_error_handler('ErrorHandler::handleError');
     $foo .= '';
     restore_error_handler();
     $result = $firecake->sentHeaders;
     $this->assertPattern('/GROUP_START/', $result['X-Wf-1-1-1-1']);
     $this->assertPattern('/ERROR/', $result['X-Wf-1-1-1-2']);
     $this->assertPattern('/GROUP_END/', $result['X-Wf-1-1-1-4']);
     Debugger::getInstance('Debugger');
     Debugger::output();
 }
开发者ID:omusico,项目名称:RentSquare,代码行数:21,代码来源:DebugKitDebuggerTest.php


示例6: fireError

 /**
  * Create a FirePHP error message
  *
  * @param array $data Data of the error
  * @param array $links  Links for the error
  * @return void
  */
 public static function fireError($data, $links)
 {
     $name = $data['error'] . ' - ' . $data['description'];
     $message = "{$data['error']} {$data['code']} {$data['description']} on line: {$data['line']} in file: {$data['file']}";
     FireCake::group($name);
     FireCake::error($message, $name);
     if (isset($data['context'])) {
         FireCake::log($data['context'], 'Context');
     }
     if (isset($data['trace'])) {
         FireCake::log($data['trace'], 'Trace');
     }
     FireCake::groupEnd();
 }
开发者ID:huanjian,项目名称:mythesis,代码行数:21,代码来源:DebugKitDebugger.php


示例7: jsonEncode

 /**
  * Encode an object into JSON
  *
  * @param mixed $object Object or array to json encode
  * @param bool $skipEncode
  * @internal param bool $doIt
  * @static
  * @return string
  */
 public static function jsonEncode($object, $skipEncode = false)
 {
     $_this = FireCake::getInstance();
     if (!$skipEncode) {
         $object = FireCake::stringEncode($object);
     }
     return json_encode($object);
 }
开发者ID:cc2i,项目名称:calibrephp,代码行数:17,代码来源:FireCake.php


示例8: testOutput

 /**
  * test _output switch to firePHP
  *
  * @return void
  */
 function testOutput()
 {
     $firecake =& FireCake::getInstance('TestFireCake');
     Debugger::invoke(DebugKitDebugger::getInstance('DebugKitDebugger'));
     Debugger::output('fb');
     $foo .= '';
     $result = $firecake->sentHeaders;
     $this->assertPattern('/GROUP_START/', $result['X-Wf-1-1-1-1']);
     $this->assertPattern('/ERROR/', $result['X-Wf-1-1-1-2']);
     $this->assertPattern('/GROUP_END/', $result['X-Wf-1-1-1-5']);
     Debugger::invoke(Debugger::getInstance('Debugger'));
     Debugger::output();
 }
开发者ID:afzet,项目名称:cake-cart,代码行数:18,代码来源:debug_kit_debugger.test.php


示例9: reset

 /**
  * Reset FireCake
  *
  * @return void
  */
 public static function reset()
 {
     $_this = FireCake::getInstance();
     $_this->sentHeaders = array();
     $_this->_messageIndex = 1;
 }
开发者ID:SebFav,项目名称:ApplicationInternet2,代码行数:11,代码来源:TestFireCake.php


示例10: panelEnd

 /**
  * End a panel (Group)
  *
  * @return void
  */
 public function panelEnd()
 {
     FireCake::groupEnd();
 }
开发者ID:basantk,项目名称:cakephp-user-login-basic-2.x,代码行数:9,代码来源:FirePhpToolbarHelper.php


示例11: jsonEncode

 /**
  * Encode an object into JSON
  *
  * @param mixed $object Object or array to json encode
  * @param bool $skipEncode Skip encoding, defaults to false.
  * @return string JSON encoded object.
  */
 public static function jsonEncode($object, $skipEncode = false)
 {
     if (!$skipEncode) {
         $object = FireCake::stringEncode($object);
     }
     return json_encode($object);
 }
开发者ID:gjcamacho,项目名称:blog_test,代码行数:14,代码来源:FireCake.php


示例12: krumo

 /**
  * A more ajax and user friendly way to var_dump.
  * Use instead of pr()
  *
  * @param mixed $var
  * @param bool $useFireCakeOutsideViews
  */
 static function krumo($var, $options = array())
 {
     $options = array('fireCake' => true, 'debug' => true);
     if ($options['debug'] && !Configure::read()) {
         return;
     }
     if ($options['fireCake'] && empty(Sl::getInstance()->view) && class_exists('FireCake')) {
         return FireCake::fb($var);
     }
     // force Pheme to keep the whitespace and line breaks
     echo "<!--{!preserveWhitespace}-->";
     App::import('vendor', 'krumo', array('file' => 'krumo/class.krumo.php'));
     return krumo::dump($var);
 }
开发者ID:sandulungu,项目名称:StarLight,代码行数:21,代码来源:sl.php


示例13: jsonEncode

 /**
  * Encode an object into JSON
  *
  * @param mixed $object Object or array to json encode
  * @param boolean $doIt
  * @access public
  * @static
  * @return string
  **/
 function jsonEncode($object, $skipEncode = false)
 {
     $_this = FireCake::getInstance();
     if (!$skipEncode) {
         $object = FireCake::stringEncode($object);
     }
     if (function_exists('json_encode') && $_this->options['useNativeJsonEncode']) {
         return json_encode($object);
     } else {
         return FireCake::_jsonEncode($object);
     }
 }
开发者ID:TomMaher,项目名称:umambo,代码行数:21,代码来源:fire_cake.php


示例14: _sendHeader

 /**
  * Send header
  *
  * @param $name
  * @param $value
  */
 protected function _sendHeader($name, $value)
 {
     $_this = FireCake::getInstance();
     $_this->sentHeaders[$name] = $value;
 }
开发者ID:Marcin11,项目名称:_mojePanstwo-Portal,代码行数:11,代码来源:TestFireCake.php


示例15: groupEnd

 /**
  * Convenience wrapper for GROUPEND messages
  * Closes a group block
  *
  * @internal param string $label Label for group (optional)
  * @return void
  */
 public static function groupEnd()
 {
     FireCake::fb(null, null, 'groupEnd');
 }
开发者ID:Marcin11,项目名称:_mojePanstwo-Portal,代码行数:11,代码来源:FireCake.php


示例16: _fireError

 /**
  * Create a FirePHP error message
  *
  * @param string $error Name of error
  * @param string $code  Code of error
  * @param string $description Description of error
  * @param string $file File error occured in
  * @param string $line Line error occured on
  * @param string $trace Stack trace at time of error
  * @param string $context context of error
  * @return void
  * @access protected
  */
 function _fireError($error, $code, $description, $file, $line, $trace, $context)
 {
     $name = $error . ' - ' . $description;
     $message = "{$error} {$code} {$description} on line: {$line} in file: {$file}";
     FireCake::group($name);
     FireCake::error($message, $name);
     FireCake::log($context, 'Context');
     FireCake::log($trace, 'Trace');
     FireCake::groupEnd();
 }
开发者ID:masayukiando,项目名称:cakephp1.3-mailmagazine,代码行数:23,代码来源:debug_kit_debugger.php


示例17: testNonNativeEncoding

 /**
  * test of Non Native JSON encoding.
  *
  * @return void
  */
 public function testNonNativeEncoding()
 {
     FireCake::setOptions(array('useNativeJsonEncode' => false));
     $json = FireCake::jsonEncode(array('one' => 1, 'two' => 2));
     $this->assertEqual($json, '{"one":1,"two":2}');
     $json = FireCake::jsonEncode(array(1, 2, 3));
     $this->assertEqual($json, '[1,2,3]');
     $json = FireCake::jsonEncode(FireCake::getInstance());
     $this->assertPattern('/"options"\\:\\{"maxObjectDepth"\\:\\d*,/', $json);
 }
开发者ID:carriercomm,项目名称:professional-inventory-and-billing-system,代码行数:15,代码来源:FireCakeTest.php


示例18: _fireError

/**
 * Create a FirePHP error message
 *
 * @param string $error Name of error
 * @param string $code  Code of error
 * @param string $description Description of error
 * @param string $file File error occured in
 * @param string $line Line error occured on
 * @param string $trace Stack trace at time of error
 * @param string $context context of error
 * @return void
 */
	protected function _fireError($error, $code, $description, $file, $line, $trace, $context) {
		$name = $error . ' - ' . $description;
		$message = "$error $code $description on line: $line in file: $file";
		FireCake::group($name);
		FireCake::error($message, $name);
		FireCake::log($context, 'Context');
		FireCake::log($trace, 'Trace');
		FireCake::groupEnd();
	}
开发者ID:neterslandreau,项目名称:tubones,代码行数:21,代码来源:DebugKitDebugger.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP FirePHP类代码示例发布时间:2022-05-23
下一篇:
PHP FinderIndexerResult类代码示例发布时间: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