[ZendBundle] added DebugLoggerInterface

This commit is contained in:
Fabien Potencier 2010-08-17 19:34:48 +02:00
parent 3f2aa37f12
commit 5ea4b348c0
2 changed files with 34 additions and 1 deletions

View File

@ -18,10 +18,13 @@ use Zend\Log\Writer\AbstractWriter;
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
class DebugLogger extends AbstractWriter
class DebugLogger extends AbstractWriter implements DebugLoggerInterface
{
protected $logs = array();
/**
* {@inheritdoc}
*/
public function getLogs()
{
return $this->logs;

View File

@ -0,0 +1,30 @@
<?php
namespace Symfony\Bundle\ZendBundle\Logger;
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/**
* DebugLoggerInterface.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
interface DebugLoggerInterface
{
/**
* Returns an array of logs.
*
* A log is an array with the following mandatory keys:
* timestamp, message, priority, and priorityName.
*
* @return array An array of logs
*/
public function getLogs();
}