|
|
@@ -451,7 +451,7 @@ class CakeEmail {
|
|
|
* @param string|array $email Null to get, String with email,
|
|
|
* Array with email as key, name as value or email as value (without name)
|
|
|
* @param string $name Name
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function addTo($email, $name = null) {
|
|
|
return $this->_addEmail('_to', $email, $name);
|
|
|
@@ -478,7 +478,7 @@ class CakeEmail {
|
|
|
* @param string|array $email Null to get, String with email,
|
|
|
* Array with email as key, name as value or email as value (without name)
|
|
|
* @param string $name Name
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function addCc($email, $name = null) {
|
|
|
return $this->_addEmail('_cc', $email, $name);
|
|
|
@@ -505,7 +505,7 @@ class CakeEmail {
|
|
|
* @param string|array $email Null to get, String with email,
|
|
|
* Array with email as key, name as value or email as value (without name)
|
|
|
* @param string $name Name
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function addBcc($email, $name = null) {
|
|
|
return $this->_addEmail('_bcc', $email, $name);
|
|
|
@@ -545,7 +545,7 @@ class CakeEmail {
|
|
|
* EmailPattern setter/getter
|
|
|
*
|
|
|
* @param string $regex for email address validation
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
*/
|
|
|
public function emailPattern($regex = null) {
|
|
|
if ($regex === null) {
|
|
|
@@ -562,7 +562,7 @@ class CakeEmail {
|
|
|
* @param string|array $email String with email,
|
|
|
* Array with email as key, name as value or email as value (without name)
|
|
|
* @param string $name Name
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
protected function _setEmail($varName, $email, $name) {
|
|
|
if (!is_array($email)) {
|
|
|
@@ -610,7 +610,7 @@ class CakeEmail {
|
|
|
* Array with email as key, name as value or email as value (without name)
|
|
|
* @param string $name Name
|
|
|
* @param string $throwMessage Exception message
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
protected function _setEmailSingle($varName, $email, $name, $throwMessage) {
|
|
|
@@ -630,7 +630,7 @@ class CakeEmail {
|
|
|
* @param string|array $email String with email,
|
|
|
* Array with email as key, name as value or email as value (without name)
|
|
|
* @param string $name Name
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
protected function _addEmail($varName, $email, $name) {
|
|
|
@@ -658,7 +658,7 @@ class CakeEmail {
|
|
|
* Get/Set Subject.
|
|
|
*
|
|
|
* @param string $subject Subject string.
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
*/
|
|
|
public function subject($subject = null) {
|
|
|
if ($subject === null) {
|
|
|
@@ -672,7 +672,7 @@ class CakeEmail {
|
|
|
* Sets headers for the message
|
|
|
*
|
|
|
* @param array $headers Associative array containing headers to be set.
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
public function setHeaders($headers) {
|
|
|
@@ -687,7 +687,7 @@ class CakeEmail {
|
|
|
* Add header for the message
|
|
|
*
|
|
|
* @param array $headers Headers to set.
|
|
|
- * @return object $this
|
|
|
+ * @return $this
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
public function addHeaders($headers) {
|
|
|
@@ -820,7 +820,7 @@ class CakeEmail {
|
|
|
*
|
|
|
* @param boolean|string $template Template name or null to not use
|
|
|
* @param boolean|string $layout Layout name or null to not use
|
|
|
- * @return array|CakeEmail
|
|
|
+ * @return array|$this
|
|
|
*/
|
|
|
public function template($template = false, $layout = false) {
|
|
|
if ($template === false) {
|
|
|
@@ -840,7 +840,7 @@ class CakeEmail {
|
|
|
* View class for render
|
|
|
*
|
|
|
* @param string $viewClass View class name.
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
*/
|
|
|
public function viewRender($viewClass = null) {
|
|
|
if ($viewClass === null) {
|
|
|
@@ -854,7 +854,7 @@ class CakeEmail {
|
|
|
* Variables to be set on render
|
|
|
*
|
|
|
* @param array $viewVars Variables to set for view.
|
|
|
- * @return array|CakeEmail
|
|
|
+ * @return array|$this
|
|
|
*/
|
|
|
public function viewVars($viewVars = null) {
|
|
|
if ($viewVars === null) {
|
|
|
@@ -868,7 +868,7 @@ class CakeEmail {
|
|
|
* Theme to use when rendering
|
|
|
*
|
|
|
* @param string $theme Theme name.
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
*/
|
|
|
public function theme($theme = null) {
|
|
|
if ($theme === null) {
|
|
|
@@ -882,7 +882,7 @@ class CakeEmail {
|
|
|
* Helpers to be used in render
|
|
|
*
|
|
|
* @param array $helpers Helpers list.
|
|
|
- * @return array|CakeEmail
|
|
|
+ * @return array|$this
|
|
|
*/
|
|
|
public function helpers($helpers = null) {
|
|
|
if ($helpers === null) {
|
|
|
@@ -896,7 +896,7 @@ class CakeEmail {
|
|
|
* Email format
|
|
|
*
|
|
|
* @param string $format Formatting string.
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
public function emailFormat($format = null) {
|
|
|
@@ -914,7 +914,7 @@ class CakeEmail {
|
|
|
* Transport name
|
|
|
*
|
|
|
* @param string $name Transport name.
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
*/
|
|
|
public function transport($name = null) {
|
|
|
if ($name === null) {
|
|
|
@@ -928,7 +928,7 @@ class CakeEmail {
|
|
|
/**
|
|
|
* Return the transport class
|
|
|
*
|
|
|
- * @return CakeEmail
|
|
|
+ * @return AbstractTransport
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
public function transportClass() {
|
|
|
@@ -951,7 +951,7 @@ class CakeEmail {
|
|
|
* Message-ID
|
|
|
*
|
|
|
* @param boolean|string $message True to generate a new Message-ID, False to ignore (not send in email), String to set as Message-ID
|
|
|
- * @return boolean|string|CakeEmail
|
|
|
+ * @return boolean|string|$this
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
public function messageId($message = null) {
|
|
|
@@ -973,7 +973,7 @@ class CakeEmail {
|
|
|
* Domain as top level (the part after @)
|
|
|
*
|
|
|
* @param string $domain Manually set the domain for CLI mailing
|
|
|
- * @return string|CakeEmail
|
|
|
+ * @return string|$this
|
|
|
*/
|
|
|
public function domain($domain = null) {
|
|
|
if ($domain === null) {
|
|
|
@@ -1027,7 +1027,7 @@ class CakeEmail {
|
|
|
* attachment compatibility with outlook email clients.
|
|
|
*
|
|
|
* @param string|array $attachments String with the filename or array with filenames
|
|
|
- * @return array|CakeEmail Either the array of attachments when getting or $this when setting.
|
|
|
+ * @return array|$this Either the array of attachments when getting or $this when setting.
|
|
|
* @throws SocketException
|
|
|
*/
|
|
|
public function attachments($attachments = null) {
|
|
|
@@ -1070,7 +1070,7 @@ class CakeEmail {
|
|
|
* Add attachments
|
|
|
*
|
|
|
* @param string|array $attachments String with the filename or array with filenames
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
* @throws SocketException
|
|
|
* @see CakeEmail::attachments()
|
|
|
*/
|
|
|
@@ -1111,7 +1111,7 @@ class CakeEmail {
|
|
|
* `$email->config(array('to' => 'bill@example.com'));`
|
|
|
*
|
|
|
* @param string|array $config String with configuration name (from email.php), array with config or null to return current config
|
|
|
- * @return string|array|CakeEmail
|
|
|
+ * @return string|array|$this
|
|
|
*/
|
|
|
public function config($config = null) {
|
|
|
if ($config === null) {
|
|
|
@@ -1259,7 +1259,7 @@ class CakeEmail {
|
|
|
/**
|
|
|
* Reset all CakeEmail internal variables to be able to send out a new email.
|
|
|
*
|
|
|
- * @return CakeEmail $this
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function reset() {
|
|
|
$this->_to = array();
|
|
|
@@ -1696,7 +1696,7 @@ class CakeEmail {
|
|
|
/**
|
|
|
* Return the Content-Transfer Encoding value based on the set charset
|
|
|
*
|
|
|
- * @return void
|
|
|
+ * @return string
|
|
|
*/
|
|
|
protected function _getContentTransferEncoding() {
|
|
|
$charset = strtoupper($this->charset);
|