TYPO3
7.6
Users
bogdan
Projects
Kapeli
Resources
Dash
Docsets
TYPO3
src
vendor
swiftmailer
swiftmailer
lib
classes
Swift
Plugins
Loggers
ArrayLogger.php
Go to the documentation of this file.
1
<?php
2
3
/*
4
* This file is part of SwiftMailer.
5
* (c) 2004-2009 Chris Corbyn
6
*
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
9
*/
10
16
class
Swift_Plugins_Loggers_ArrayLogger
implements
Swift_Plugins_Logger
17
{
23
private
$_log
= array();
24
30
private
$_size
= 0;
31
37
public
function
__construct
($size = 50)
38
{
39
$this->_size = $size;
40
}
41
47
public
function
add
($entry)
48
{
49
$this->_log[] = $entry;
50
while
(count($this->_log) > $this->_size) {
51
array_shift($this->_log);
52
}
53
}
54
58
public
function
clear
()
59
{
60
$this->_log = array();
61
}
62
68
public
function
dump
()
69
{
70
return
implode(PHP_EOL, $this->_log);
71
}
72
}
Generated on Wed Nov 11 2015 01:51:50 for TYPO3 by
1.8.3