PHP Classes

File: library/EasyLogger/Handler/TestHandler.php

Recommend this page to a friend!
  Classes of Nikola Posa   EasyLogger   library/EasyLogger/Handler/TestHandler.php   Download  
File: library/EasyLogger/Handler/TestHandler.php
Role: Class source
Content type: text/plain
Description: Handler used only in unit tests
Class: EasyLogger
Log events to files
Author: By
Last change:
Date: 11 years ago
Size: 612 bytes
 

Contents

Class file image Download
<?php
/**
 * EasyLogger
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 */

require_once 'EasyLogger/Handler/HandlerInterface.php';

/**
 * Used only for testing purposes.
 *
 * @author Nikola Posa <posa.nikola@gmail.com>
 */
class EasyLogger_Handler_TestHandler implements EasyLogger_Handler_HandlerInterface
{
    private
$_records = array();
   
    public function
handle(array $record)
    {
       
$this->_records[] = $record;
    }
   
    public function
getRecords()
    {
        return
$this->_records;
    }
}