1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 15:44:34 +02:00
This commit is contained in:
Rob Jensen
2011-07-19 15:04:23 +01:00
parent c0cfb39d75
commit 6a2e2142d6
4 changed files with 11 additions and 38 deletions

View File

@@ -1,23 +0,0 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monolog\Processor;
/**
* Basic processor class
* @author Rob Jensen
*/
abstract class AbstractProcessor
{
abstract public function __invoke( array $record );
}

View File

@@ -15,21 +15,17 @@ namespace Monolog\Processor;
* Some methods that are common for all memory processors * Some methods that are common for all memory processors
* @author Rob Jensen * @author Rob Jensen
*/ */
abstract class MemoryProcessor extends AbstractProcessor class MemoryProcessor
{ {
protected $realUsage; protected $realUsage;
/** /**
* @param array $options * @param boolean $realUsage
*/ */
public function __construct( $options = array() ) public function __construct($realUsage = true)
{ {
if(array_key_exists('realUsage', $options )){ $this->realUsage = (boolean) $realUsage;
$this->realUsage = (boolean) $options['realUsage'];
} else {
$this->realUsage = true;
}
} }
/** /**