diff options
author | robocoder <anthon.pang@gmail.com> | 2010-01-29 12:02:30 +0300 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2010-01-29 12:02:30 +0300 |
commit | 1378f79297baa84590738839ec11cef90ac21bc4 (patch) | |
tree | 61b8272e59891a9d5d175d8a883a978fd913daf0 /libs/Zend/Mail/Protocol | |
parent | f156256d1f2537e6e448c7b8b5852d59a0e9099e (diff) |
update wrt Zend Framework 1.10.0; remove svn:eol-style property
git-svn-id: http://dev.piwik.org/svn/trunk@1813 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/Zend/Mail/Protocol')
-rw-r--r-- | libs/Zend/Mail/Protocol/Abstract.php | 39 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Exception.php | 6 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Imap.php | 6 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Pop3.php | 6 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Smtp.php | 6 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php | 6 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Smtp/Auth/Login.php | 6 | ||||
-rw-r--r-- | libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php | 6 |
8 files changed, 50 insertions, 31 deletions
diff --git a/libs/Zend/Mail/Protocol/Abstract.php b/libs/Zend/Mail/Protocol/Abstract.php index 57844592df..617e7b7c52 100644 --- a/libs/Zend/Mail/Protocol/Abstract.php +++ b/libs/Zend/Mail/Protocol/Abstract.php @@ -16,9 +16,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Abstract.php 19916 2009-12-24 10:35:22Z yoshida@zend.co.jp $ + * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -42,9 +42,9 @@ require_once 'Zend/Validate/Hostname.php'; * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Abstract.php 19916 2009-12-24 10:35:22Z yoshida@zend.co.jp $ + * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $ * @todo Implement proxy settings */ abstract class Zend_Mail_Protocol_Abstract @@ -60,6 +60,11 @@ abstract class Zend_Mail_Protocol_Abstract */ const TIMEOUT_CONNECTION = 30; + /** + * Maximum of the transaction log + */ + const MAXIMUM_LOG = 64; + /** * Hostname or IP address of remote server @@ -112,9 +117,9 @@ abstract class Zend_Mail_Protocol_Abstract /** * Log of mail requests and server responses for a session - * @var string + * @var array */ - private $_log; + private $_log = array(); /** @@ -191,7 +196,7 @@ abstract class Zend_Mail_Protocol_Abstract */ public function getLog() { - return $this->_log; + return implode('', $this->_log); } @@ -202,9 +207,23 @@ abstract class Zend_Mail_Protocol_Abstract */ public function resetLog() { - $this->_log = ''; + $this->_log = array(); } + /** + * Add the transaction log + * + * @param string new transaction + * @return void + */ + protected function _addLog($value) + { + if (count($this->_log) >= self::MAXIMUM_LOG) { + array_shift($this->_log); + } + + $this->_log[] = $value; + } /** * Connect to the server using the supplied transport and target @@ -281,7 +300,7 @@ abstract class Zend_Mail_Protocol_Abstract $result = fwrite($this->_socket, $request . self::EOL); // Save request to internal log - $this->_log .= $request . self::EOL; + $this->_addLog($request . self::EOL); if ($result === false) { /** @@ -321,7 +340,7 @@ abstract class Zend_Mail_Protocol_Abstract $reponse = fgets($this->_socket, 1024); // Save request to internal log - $this->_log .= $reponse; + $this->_addLog($reponse); // Check meta data to ensure connection is still valid $info = stream_get_meta_data($this->_socket); diff --git a/libs/Zend/Mail/Protocol/Exception.php b/libs/Zend/Mail/Protocol/Exception.php index dc0aee035e..15f446836e 100644 --- a/libs/Zend/Mail/Protocol/Exception.php +++ b/libs/Zend/Mail/Protocol/Exception.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $ + * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -31,7 +31,7 @@ require_once 'Zend/Mail/Exception.php'; * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Exception extends Zend_Mail_Exception diff --git a/libs/Zend/Mail/Protocol/Imap.php b/libs/Zend/Mail/Protocol/Imap.php index b0da4f4105..77c2ee32c7 100644 --- a/libs/Zend/Mail/Protocol/Imap.php +++ b/libs/Zend/Mail/Protocol/Imap.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Imap.php 18977 2009-11-14 14:15:59Z yoshida@zend.co.jp $ + * @version $Id: Imap.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Imap diff --git a/libs/Zend/Mail/Protocol/Pop3.php b/libs/Zend/Mail/Protocol/Pop3.php index 5bf3287eff..7678b345de 100644 --- a/libs/Zend/Mail/Protocol/Pop3.php +++ b/libs/Zend/Mail/Protocol/Pop3.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Pop3.php 18731 2009-10-29 04:18:19Z yoshida@zend.co.jp $ + * @version $Id: Pop3.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Pop3 diff --git a/libs/Zend/Mail/Protocol/Smtp.php b/libs/Zend/Mail/Protocol/Smtp.php index 527f821815..acd5c5425b 100644 --- a/libs/Zend/Mail/Protocol/Smtp.php +++ b/libs/Zend/Mail/Protocol/Smtp.php @@ -16,9 +16,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Smtp.php 18951 2009-11-12 16:26:19Z alexander $ + * @version $Id: Smtp.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -42,7 +42,7 @@ require_once 'Zend/Mail/Protocol/Abstract.php'; * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp extends Zend_Mail_Protocol_Abstract diff --git a/libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php b/libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php index 955cbaf8bd..4b2aa4b28b 100644 --- a/libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php +++ b/libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Crammd5.php 18951 2009-11-12 16:26:19Z alexander $ + * @version $Id: Crammd5.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -33,7 +33,7 @@ require_once 'Zend/Mail/Protocol/Smtp.php'; * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp_Auth_Crammd5 extends Zend_Mail_Protocol_Smtp diff --git a/libs/Zend/Mail/Protocol/Smtp/Auth/Login.php b/libs/Zend/Mail/Protocol/Smtp/Auth/Login.php index 08cbbce3aa..ab79748aed 100644 --- a/libs/Zend/Mail/Protocol/Smtp/Auth/Login.php +++ b/libs/Zend/Mail/Protocol/Smtp/Auth/Login.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Login.php 18951 2009-11-12 16:26:19Z alexander $ + * @version $Id: Login.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -33,7 +33,7 @@ require_once 'Zend/Mail/Protocol/Smtp.php'; * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp_Auth_Login extends Zend_Mail_Protocol_Smtp diff --git a/libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php b/libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php index 698acd9a05..a8c2f61f85 100644 --- a/libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php +++ b/libs/Zend/Mail/Protocol/Smtp/Auth/Plain.php @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Plain.php 18951 2009-11-12 16:26:19Z alexander $ + * @version $Id: Plain.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -33,7 +33,7 @@ require_once 'Zend/Mail/Protocol/Smtp.php'; * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp_Auth_Plain extends Zend_Mail_Protocol_Smtp |