start creating debugbar
This commit is contained in:
@@ -41,7 +41,8 @@
|
|||||||
},
|
},
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
"phpunit/phpunit": "3.7.*",
|
"phpunit/phpunit": "3.7.*",
|
||||||
"fzaninotto/faker": "dev-master"
|
"fzaninotto/faker": "dev-master",
|
||||||
|
"maximebf/debugbar": "1.*"
|
||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"config" : {
|
"config" : {
|
||||||
|
|||||||
51
composer.lock
generated
51
composer.lock
generated
@@ -3,7 +3,7 @@
|
|||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||||
],
|
],
|
||||||
"hash": "db69990b239a4056558bfd694115d01b",
|
"hash": "4add17e0d3f6275417122481707e9f52",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "ezyang/htmlpurifier",
|
"name": "ezyang/htmlpurifier",
|
||||||
@@ -1662,6 +1662,55 @@
|
|||||||
],
|
],
|
||||||
"time": "2013-08-29 19:11:59"
|
"time": "2013-08-29 19:11:59"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "maximebf/debugbar",
|
||||||
|
"version": "1.5.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||||
|
"reference": "37dccc40da52bf9f85571c30cf302da696db0d05"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/37dccc40da52bf9f85571c30cf302da696db0d05",
|
||||||
|
"reference": "37dccc40da52bf9f85571c30cf302da696db0d05",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0",
|
||||||
|
"psr/log": "~1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"kriswallsmith/assetic": "The best way to manage assets",
|
||||||
|
"monolog/monolog": "Log using Monolog"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"DebugBar": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Maxime Bouroumeau-Fuseau",
|
||||||
|
"email": "maxime.bouroumeau@gmail.com",
|
||||||
|
"homepage": "http://maximebf.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Debug bar in the browser for php application",
|
||||||
|
"homepage": "https://github.com/maximebf/php-debugbar",
|
||||||
|
"keywords": [
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"time": "2013-08-17 02:02:49"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "1.2.12",
|
"version": "1.2.12",
|
||||||
|
|||||||
76
core/lib/Thelia/DataCollector/PropelCollector.php
Normal file
76
core/lib/Thelia/DataCollector/PropelCollector.php
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Thelia */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : info@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* This program is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU General Public License as published by */
|
||||||
|
/* the Free Software Foundation; either version 3 of the License */
|
||||||
|
/* */
|
||||||
|
/* This program is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU General Public License */
|
||||||
|
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
/* */
|
||||||
|
/*************************************************************************************/
|
||||||
|
namespace Thelia\DataCollector;
|
||||||
|
|
||||||
|
use DebugBar\DataCollector\DataCollector;
|
||||||
|
use DebugBar\DataCollector\Renderable;
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PropelCollector
|
||||||
|
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class PropelCollector extends DataCollector implements Renderable, LoggerInterface {
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$serviceContainer = Propel::getServiceContainer();
|
||||||
|
$serviceContainer->setLogger('debugBarLogger', $this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the DebugBar when data needs to be collected
|
||||||
|
*
|
||||||
|
* @return array Collected data
|
||||||
|
*/
|
||||||
|
function collect()
|
||||||
|
{
|
||||||
|
// TODO: Implement collect() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the unique name of the collector
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getName()
|
||||||
|
{
|
||||||
|
// TODO: Implement getName() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWidgets()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
"propel" => array(
|
||||||
|
"widget" => "PhpDebugBar.Widgets.SQLQueriesWidget",
|
||||||
|
"map" => "propel 2",
|
||||||
|
"default" => "[]"
|
||||||
|
),
|
||||||
|
"propel:badge" => array(
|
||||||
|
"map" => "propel.nb_statements",
|
||||||
|
"default" => 0
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user