mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
swiftmailer
This commit is contained in:
@@ -20,14 +20,14 @@ class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_log = array();
|
||||
private $log = array();
|
||||
|
||||
/**
|
||||
* Max size of the log.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_size = 0;
|
||||
private $size = 0;
|
||||
|
||||
/**
|
||||
* Create a new ArrayLogger with a maximum of $size entries.
|
||||
@@ -36,7 +36,7 @@ class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger
|
||||
*/
|
||||
public function __construct($size = 50)
|
||||
{
|
||||
$this->_size = $size;
|
||||
$this->size = $size;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,9 +46,9 @@ class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger
|
||||
*/
|
||||
public function add($entry)
|
||||
{
|
||||
$this->_log[] = $entry;
|
||||
while (count($this->_log) > $this->_size) {
|
||||
array_shift($this->_log);
|
||||
$this->log[] = $entry;
|
||||
while (count($this->log) > $this->size) {
|
||||
array_shift($this->log);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->_log = array();
|
||||
$this->log = array();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,6 +67,6 @@ class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger
|
||||
*/
|
||||
public function dump()
|
||||
{
|
||||
return implode(PHP_EOL, $this->_log);
|
||||
return implode(PHP_EOL, $this->log);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user