Browse Source

Method 'MessageInterface::__toString()' added

tags/2.0.0-alpha
Paul Klimov 12 years ago
parent
commit
54722e6816
  1. 48
      yii/swiftmailer/Message.php

48
yii/swiftmailer/Message.php

@ -49,6 +49,14 @@ class Message extends BaseMessage
}
/**
* @return string from address of this message.
*/
public function getFrom()
{
return $this->getSwiftMessage()->getFrom();
}
/**
* @inheritdoc
*/
public function setTo($to)
@ -57,6 +65,14 @@ class Message extends BaseMessage
}
/**
* @return array To addresses of this message.
*/
public function getTo()
{
return $this->getSwiftMessage()->getTo();
}
/**
* @inheritdoc
*/
public function setCc($cc)
@ -65,6 +81,14 @@ class Message extends BaseMessage
}
/**
* @return array Cc address of this message.
*/
public function getCc()
{
return $this->getSwiftMessage()->getCc();
}
/**
* @inheritdoc
*/
public function setBcc($bcc)
@ -73,6 +97,14 @@ class Message extends BaseMessage
}
/**
* @return array Bcc addresses of this message.
*/
public function getBcc()
{
return $this->getSwiftMessage()->getBcc();
}
/**
* @inheritdoc
*/
public function setSubject($subject)
@ -81,6 +113,14 @@ class Message extends BaseMessage
}
/**
* @return string the subject of this message.
*/
public function getSubject()
{
return $this->getSwiftMessage()->getSubject();
}
/**
* @inheritdoc
*/
public function setText($text)
@ -123,4 +163,12 @@ class Message extends BaseMessage
$attachment = \Swift_Attachment::newInstance($content, $fileName, $contentType);
$this->getSwiftMessage()->attach($attachment);
}
/**
* @inheritdoc
*/
public function __toString()
{
return $this->getSwiftMessage()->toString();
}
}
Loading…
Cancel
Save