4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-14 21:26:37 +00:00
AzuraCast/app/library/DF/Doctrine/Logger/EchoSQL.php
2014-02-21 03:25:10 -06:00

27 lines
579 B
PHP
Executable File

<?php
namespace DF\Doctrine\Logger;
class EchoSQL extends \Doctrine\DBAL\Logging\EchoSQLLogger
{
public function startQuery($sql, array $params = null, array $types = null)
{
echo $sql.PHP_EOL;
if ($params) {
var_dump($params);
}
if ($types) {
var_dump($types);
}
$memory = memory_get_usage();
$mb = round($memory / (1024 * 1024), 4).'M';
echo $mb.'/'.ini_get('memory_limit').PHP_EOL;
}
public function stopQuery()
{}
}