mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 02:58:23 +01:00
swiftmailer
This commit is contained in:
@@ -20,17 +20,17 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_out = 0;
|
||||
private $out = 0;
|
||||
|
||||
/**
|
||||
* The incoming traffic counter.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_in = 0;
|
||||
private $in = 0;
|
||||
|
||||
/** Bound byte streams */
|
||||
private $_mirrors = array();
|
||||
private $mirrors = array();
|
||||
|
||||
/**
|
||||
* Not used.
|
||||
@@ -58,7 +58,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
public function commandSent(Swift_Events_CommandEvent $evt)
|
||||
{
|
||||
$command = $evt->getCommand();
|
||||
$this->_out += strlen($command);
|
||||
$this->out += strlen($command);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
public function responseReceived(Swift_Events_ResponseEvent $evt)
|
||||
{
|
||||
$response = $evt->getResponse();
|
||||
$this->_in += strlen($response);
|
||||
$this->in += strlen($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,8 +79,8 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function write($bytes)
|
||||
{
|
||||
$this->_out += strlen($bytes);
|
||||
foreach ($this->_mirrors as $stream) {
|
||||
$this->out += strlen($bytes);
|
||||
foreach ($this->mirrors as $stream) {
|
||||
$stream->write($bytes);
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function bind(Swift_InputByteStream $is)
|
||||
{
|
||||
$this->_mirrors[] = $is;
|
||||
$this->mirrors[] = $is;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,9 +116,9 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function unbind(Swift_InputByteStream $is)
|
||||
{
|
||||
foreach ($this->_mirrors as $k => $stream) {
|
||||
foreach ($this->mirrors as $k => $stream) {
|
||||
if ($is === $stream) {
|
||||
unset($this->_mirrors[$k]);
|
||||
unset($this->mirrors[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function flushBuffers()
|
||||
{
|
||||
foreach ($this->_mirrors as $stream) {
|
||||
foreach ($this->mirrors as $stream) {
|
||||
$stream->flushBuffers();
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function getBytesOut()
|
||||
{
|
||||
return $this->_out;
|
||||
return $this->out;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -150,7 +150,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function getBytesIn()
|
||||
{
|
||||
return $this->_in;
|
||||
return $this->in;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,7 +158,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->_out = 0;
|
||||
$this->_in = 0;
|
||||
$this->out = 0;
|
||||
$this->in = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user