. */ namespace Doctrine\DBAL\Logging; /** * Includes executed SQLs in a Debug Stack * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision$ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ class DebugStack implements SQLLogger { /** @var array $queries Executed SQL queries. */ public $queries = array(); /** @var boolean $enabled If Debug Stack is enabled (log queries) or not. */ public $enabled = true; /** * {@inheritdoc} */ public function logSQL($sql, array $params = null) { if ($this->enabled) { $this->queries[] = array('sql' => $sql, 'params' => $params); } } }