Browse Source

[ZendBundle] added DebugLoggerInterface

Fabien Potencier 14 years ago
parent
commit
5ea4b348c0

+ 4 - 1
src/Symfony/Bundle/ZendBundle/Logger/DebugLogger.php

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

+ 30 - 0
src/Symfony/Bundle/ZendBundle/Logger/DebugLoggerInterface.php

@@ -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();
+}