Browse Source

Doc comments for "MessageInterface" and "MailerInterface" updated.

tags/2.0.0-beta
Paul Klimov 11 years ago
parent
commit
85c26332c5
  1. 9
      framework/yii/mail/MailerInterface.php
  2. 4
      framework/yii/mail/MessageInterface.php

9
framework/yii/mail/MailerInterface.php

@ -9,6 +9,15 @@ namespace yii\mail;
/** /**
* MailerInterface is an interface, which any mailer should apply. * MailerInterface is an interface, which any mailer should apply.
* Mailer creates and sends messages. Also it allows composition of the message
* body via view rendering:
* ~~~php
* Yii::$app->mail->compose('contact/html', ['contactForm' => $form])
* ->from('from@domain.com')
* ->to($form->email)
* ->subject($form->subject)
* ->send();
* ~~~
* *
* @see MessageInterface * @see MessageInterface
* *

4
framework/yii/mail/MessageInterface.php

@ -16,8 +16,8 @@ namespace yii\mail;
* ->from('from@domain.com') * ->from('from@domain.com')
* ->to('to@domain.com') * ->to('to@domain.com')
* ->subject('Message Subject') * ->subject('Message Subject')
* ->renderText('text/view') * ->textBody('Plain text content')
* ->renderHtml('html/view') * ->htmlBody('<b>HTML content</b>')
* ->send(); * ->send();
* ~~~ * ~~~
* *

Loading…
Cancel
Save