Permalink
Browse files

[Zend\Mail] Typo, Docblocks and Missing classes

  • Loading branch information...
1 parent 8fa80a7 commit 535de4b217dadeb3df43a6f8b4b03de9413cc798 @Maks3w Maks3w committed Apr 27, 2012
Showing with 354 additions and 330 deletions.
  1. +5 −4 library/Zend/Mail/Address.php
  2. +18 −12 library/Zend/Mail/AddressList.php
  3. +38 −0 library/Zend/Mail/Exception/DomainException.php
  4. +1 −1 library/Zend/Mail/Header/AbstractAddressList.php
  5. +7 −5 library/Zend/Mail/Header/ContentType.php
  6. +2 −1 library/Zend/Mail/Header/GenericHeader.php
  7. +7 −5 library/Zend/Mail/Header/GenericMultiHeader.php
  8. +2 −3 library/Zend/Mail/Header/MimeVersion.php
  9. +4 −3 library/Zend/Mail/Header/Received.php
  10. +1 −0 library/Zend/Mail/Header/Sender.php
  11. +3 −2 library/Zend/Mail/Header/Subject.php
  12. +4 −4 library/Zend/Mail/Headers.php
  13. +14 −13 library/Zend/Mail/Message.php
  14. +11 −16 library/Zend/Mail/Protocol/AbstractProtocol.php
  15. +1 −0 library/Zend/Mail/Protocol/Exception/InvalidArgumentException.php
  16. +11 −13 library/Zend/Mail/Protocol/Imap.php
  17. +12 −19 library/Zend/Mail/Protocol/Pop3.php
  18. +7 −21 library/Zend/Mail/Protocol/Smtp.php
  19. +3 −5 library/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php
  20. +2 −4 library/Zend/Mail/Protocol/Smtp/Auth/Login.php
  21. +2 −4 library/Zend/Mail/Protocol/Smtp/Auth/Plain.php
  22. +3 −3 library/Zend/Mail/Protocol/SmtpBroker.php
  23. +13 −18 library/Zend/Mail/Storage/AbstractStorage.php
  24. +1 −1 library/Zend/Mail/Storage/Folder.php
  25. +4 −5 library/Zend/Mail/Storage/Folder/Maildir.php
  26. +8 −9 library/Zend/Mail/Storage/Folder/Mbox.php
  27. +33 −31 library/Zend/Mail/Storage/Imap.php
  28. +2 −2 library/Zend/Mail/Storage/MailPart.php
  29. +26 −25 library/Zend/Mail/Storage/Maildir.php
  30. +15 −14 library/Zend/Mail/Storage/Mbox.php
  31. +2 −2 library/Zend/Mail/Storage/Message.php
  32. +1 −1 library/Zend/Mail/Storage/Message/File.php
  33. +8 −8 library/Zend/Mail/Storage/Part.php
  34. +4 −3 library/Zend/Mail/Storage/Part/File.php
  35. +10 −14 library/Zend/Mail/Storage/Pop3.php
  36. +28 −19 library/Zend/Mail/Storage/Writable/Maildir.php
  37. +0 −1 library/Zend/Mail/Transport.php
  38. +3 −5 library/Zend/Mail/Transport/File.php
  39. +8 −6 library/Zend/Mail/Transport/FileOptions.php
  40. +13 −12 library/Zend/Mail/Transport/Sendmail.php
  41. +9 −11 library/Zend/Mail/Transport/Smtp.php
  42. +6 −3 library/Zend/Mail/Transport/SmtpOptions.php
  43. +2 −2 library/Zend/Mime/Decode.php
@@ -33,10 +33,11 @@ class Address implements AddressDescription
/**
* Constructor
- *
- * @param string $email
- * @param null|string $name
- * @return void
+ *
+ * @param string $email
+ * @param null|string $name
+ * @throws Exception\InvalidArgumentException
+ * @return \Zend\Mail\Address
*/
public function __construct($email, $name = null)
{
@@ -40,9 +40,10 @@ class AddressList implements Countable, Iterator
/**
* Add an address to the list
- *
- * @param string|AddressDescription $emailOrAddress
- * @param null|string $name
+ *
+ * @param string|AddressDescription $emailOrAddress
+ * @param null|string $name
+ * @throws Exception\InvalidArgumentException
* @return AddressList
*/
public function add($emailOrAddress, $name = null)
@@ -71,11 +72,12 @@ public function add($emailOrAddress, $name = null)
/**
* Add many addresses at once
*
- * If an email key is provided, it will be used as the email, and the value
- * as the name. Otherwise, the value is passed as the sole argument to add(),
+ * If an email key is provided, it will be used as the email, and the value
+ * as the name. Otherwise, the value is passed as the sole argument to add(),
* and, as such, can be either email strings or AddressDescription objects.
- *
- * @param array $addresses
+ *
+ * @param array $addresses
+ * @throws Exception\RuntimeException
* @return AddressList
*/
public function addMany(array $addresses)
@@ -125,7 +127,7 @@ public function has($email)
* Get an address by email
*
* @param string $email
- * @return false|AddressDescription
+ * @return boolean|AddressDescription
*/
public function get($email)
{
@@ -166,8 +168,10 @@ public function count()
/**
* Rewind iterator
- *
- * @return void
+ *
+ * @return mixed the value of the first addresses element, or false if the addresses is
+ * empty.
+ * @see addresses
*/
public function rewind()
{
@@ -196,8 +200,10 @@ public function key()
/**
* Move to next item
- *
- * @return void
+ *
+ * @return mixed the addresses value in the next place that's pointed to by the
+ * internal array pointer, or false if there are no more elements.
+ * @see addresses
*/
public function next()
{
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Mail
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @version $Id$
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Zend\Mail\Exception;
+
+use Zend\Mail\Exception;
+
+/**
+ * Exception for Zend_Mail component.
+ *
+ * @category Zend
+ * @package Zend_Mail
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class DomainException
+ extends \DomainException
+ implements Exception
+{
+}
@@ -61,6 +61,7 @@
* Parse string to create header object
*
* @param string $headerLine
+ * @throws Exception\InvalidArgumentException
* @return AbstractAddressList
*/
public static function fromString($headerLine)
@@ -180,7 +181,6 @@ public function getEncoding()
* Set address list for this header
*
* @param AddressList $addressList
- * @return void
*/
public function setAddressList(AddressList $addressList)
{
@@ -51,8 +51,9 @@ class ContentType implements Header
/**
* Factory: create Content-Type header object from string
- *
- * @param string $headerLine
+ *
+ * @param string $headerLine
+ * @throws Exception\InvalidArgumentException
* @return ContentType
*/
public static function fromString($headerLine)
@@ -147,8 +148,9 @@ public function toString()
/**
* Set the content type
- *
- * @param string $type
+ *
+ * @param string $type
+ * @throws Exception\InvalidArgumentException
* @return ContentType
*/
public function setType($type)
@@ -167,7 +169,7 @@ public function setType($type)
/**
* Retrieve the content type
*
- * @return void
+ * @return string
*/
public function getType()
{
@@ -83,8 +83,9 @@ public function __construct($fieldName = null, $fieldValue = null)
/**
* Set header field name
- *
+ *
* @param string $fieldName
+ * @throws Exception\InvalidArgumentException
* @return GenericHeader
*/
public function setFieldName($fieldName)
@@ -48,7 +48,7 @@ class GenericMultiHeader implements MultipleHeaderDescription
protected $encoding = 'ASCII';
/**
- * Deserialize from a string
+ * Unserialize from a string
*
* @param string $headerLine
* @return GenericMultiHeader
@@ -91,8 +91,9 @@ public function __construct($fieldName = null, $fieldValue = null)
/**
* Set header name
- *
+ *
* @param string $fieldName
+ * @throws Exception\InvalidArgumentException
* @return GenericHeader
*/
public function setFieldName($fieldName)
@@ -189,9 +190,10 @@ public function toString()
}
/**
- * Cast multiple header objectss to a single string header
- *
- * @param array $headers
+ * Cast multiple header objects to a single string header
+ *
+ * @param array $headers
+ * @throws Exception\InvalidArgumentException
* @return string
*/
public function toStringMultipleHeaders(array $headers)
@@ -38,9 +38,10 @@ class MimeVersion implements Header
protected $version = '1.0';
/**
- * Deserialize from string
+ * Unserialize from string
*
* @param string $headerLine
+ * @throws Exception\InvalidArgumentException
* @return MimeVersion
*/
public static function fromString($headerLine)
@@ -85,7 +86,6 @@ public function getFieldValue()
* Set character encoding
*
* @param string $encoding
- * @return void
*/
public function setEncoding($encoding)
{
@@ -95,7 +95,6 @@ public function setEncoding($encoding)
/**
* Get character encoding
*
- * @return void
*/
public function getEncoding()
{
@@ -116,11 +116,12 @@ public function toString()
{
return 'Received: ' . $this->getFieldValue();
}
-
+
/**
* Serialize collection of Received headers to string
- *
- * @param array $headers
+ *
+ * @param array $headers
+ * @throws Exception\RuntimeException
* @return string
*/
public function toStringMultipleHeaders(array $headers)
@@ -149,6 +149,7 @@ public function toString()
*
* @param string|AddressDescription $emailOrAddress
* @param null|string $name
+ * @throws Exception\InvalidArgumentException
* @return Sender
*/
public function setAddress($emailOrAddress, $name = null)
@@ -46,8 +46,9 @@ class Subject implements Header, UnstructuredHeader
/**
* Factory from header line
- *
- * @param string $headerLine
+ *
+ * @param string $headerLine
+ * @throws Exception\InvalidArgumentException
* @return Subject
*/
public static function fromString($headerLine)
@@ -71,6 +71,7 @@ class Headers implements Iterator, Countable
* will be lazy loaded)
*
* @param string $string
+ * @throws Exception\RuntimeException
* @return Headers
*/
public static function fromString($string)
@@ -187,6 +188,7 @@ public function getEncoding()
* Expects an array (or Traversable object) of type/value pairs.
*
* @param array|Traversable $headers
+ * @throws Exception\InvalidArgumentException
* @return Headers
*/
public function addHeaders($headers)
@@ -309,7 +311,7 @@ public function clearHeaders()
* Get all headers of a certain name/type
*
* @param string $name
- * @return false|Header|ArrayIterator
+ * @return boolean|Header|ArrayIterator
*/
public function get($name)
{
@@ -359,7 +361,6 @@ public function has($name)
/**
* Advance the pointer for this object as an interator
*
- * @return void
*/
public function next()
{
@@ -389,7 +390,6 @@ public function valid()
/**
* Reset the internal pointer for this object as an iterator
*
- * @return void
*/
public function rewind()
{
@@ -491,7 +491,7 @@ public function forceLoading()
/**
* @param $index
- * @return mixed|void
+ * @return mixed
*/
protected function lazyLoadHeader($index)
{
@@ -314,7 +314,7 @@ public function replyTo()
*
* @param mixed $emailOrAddress
* @param mixed $name
- * @return void
+ * @return Message
*/
public function setSender($emailOrAddress, $name = null)
{
@@ -370,8 +370,9 @@ public function getSubject()
/**
* Set the message body
- *
- * @param null|string|MimeMessage|object $body
+ *
+ * @param null|string|MimeMessage|object $body
+ * @throws Exception\InvalidArgumentException
* @return Message
*/
public function setBody($body)
@@ -471,7 +472,6 @@ protected function getHeader($headerName, $headerClass)
* Clear a header by name
*
* @param string $headerName
- * @return void
*/
protected function clearHeaderByName($headerName)
{
@@ -487,9 +487,10 @@ protected function clearHeaderByName($headerName)
*
* Used with To, From, Cc, Bcc, and ReplyTo headers. If the header does not
* exist, instantiates it.
- *
- * @param string $headerName
- * @param string $headerClass
+ *
+ * @param string $headerName
+ * @param string $headerClass
+ * @throws Exception\DomainException
* @return AddressList
*/
protected function getAddressListFromHeader($headerName, $headerClass)
@@ -508,12 +509,12 @@ protected function getAddressListFromHeader($headerName, $headerClass)
* Update an address list
*
* Proxied to this from addFrom, addTo, addCc, addBcc, and addReplyTo.
- *
- * @param AddressList $addressList
- * @param string|AddressDescription|array|AddressList|Traversable $emailOrAddressOrList
- * @param null|string $name
- * @param string $callingMethod
- * @return void
+ *
+ * @param AddressList $addressList
+ * @param string|AddressDescription|array|AddressList|Traversable $emailOrAddressOrList
+ * @param null|string $name
+ * @param string $callingMethod
+ * @throws Exception\InvalidArgumentException
*/
protected function updateAddressList(AddressList $addressList, $emailOrAddressOrList, $name, $callingMethod)
{
Oops, something went wrong.

0 comments on commit 535de4b

Please sign in to comment.