开发/firephp-bundle

FirePHPBundle 为您的 Symfony2 项目提供了简单的 FirePHP 集成。

安装数: 39,771

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 2

类型:symfony-bundle

dev-master 2013-09-08 12:36 UTC

This package is not auto-updated.

Last update: 2024-09-23 14:33:53 UTC


README

FirePHPBundle 为您的 Symfony2 项目提供了简单的 FirePHP 集成。

安装

将 FirePHPBundle 添加到 vendor/bundles 目录

使用 composer(推荐)

通过 composer 需求 FirePHPBundle

"require-dev": {
    "dvelopment/firephp-bundle": "dev-master"
}

使用依赖文件

将以下行添加到 deps 文件

; Debugging
[FirePHPBundle]
    git=git://github.com/Jehu/FirePHPBundle.git
    target=/bundles/FirePHPBundle

使用子模块

git submodule add git://github.com/Jehu/FirePHPBundle.git vendor/bundles/FirePHPBundle

将 FirePHPBundle 添加到您的应用程序内核

// app/AppKernel.php
public function registerBundles()
{

	// ...
	if (in_array($this->getEnvironment(), array('dev', 'test')) || (strpos($this->getEnvironment(), 'dev_') === 0)) {
	{
		// ...
		$bundles[] = new FirePHPBundle\FirePHPBundle();
	}

	return $bundles;
}

将 FireBugBundle 添加到您的 autoload.php(如果不通过 composer 安装则需要)

// app/autoload.php
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
    // ...
    'FirePHP'          => __DIR__.'/../vendor/bundles',
));

将 FirePHPBundle 添加到您的应用程序配置

// app/config/config_dev.yml

// ...

fire_php: ~

使用方法

有关可用方法的详细信息,请参阅(http://www.firephp.org/HQ/Use.htm

从控制器

public function indexAction()
{
	$fb = $this->get('fire_php');
	$fb->log(array(1,2,3));

    // ...
}