Added more information to the Propel panel by using the Propel logger
This commit is contained in:
parent
e9cbf82de1
commit
fe58d40a38
4 changed files with 118 additions and 3 deletions
73
DataCollector/Query.php
Normal file
73
DataCollector/Query.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
namespace Propel\PropelBundle\DataCollector;
|
||||
|
||||
/**
|
||||
* A Query class is designed to represent query information.
|
||||
*
|
||||
* @author William DURAND <william.durand1@gmail.com>
|
||||
*/
|
||||
class Query
|
||||
{
|
||||
/**
|
||||
* SQL statement
|
||||
* @var string
|
||||
*/
|
||||
private $sql;
|
||||
/**
|
||||
* Execution time
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $time;
|
||||
/**
|
||||
* Memory
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $memory;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*
|
||||
* @param $sql A SQL statement
|
||||
* @param $time An execution time
|
||||
* @param $memory Memory used
|
||||
*/
|
||||
public function __construct($sql, $time, $memory)
|
||||
{
|
||||
$this->sql = $sql;
|
||||
$this->time = $time;
|
||||
$this->memory = $memory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter
|
||||
*
|
||||
* @return string SQL statement
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter
|
||||
*
|
||||
* @return string Execution time
|
||||
*/
|
||||
public function getTime()
|
||||
{
|
||||
return $this->time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter
|
||||
*
|
||||
* @return string Memory
|
||||
*/
|
||||
public function getMemory()
|
||||
{
|
||||
return $this->memory;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue