'yii\mail\MessageInterface' updated:

- 'body()' renamed to 'renderBody()'
- new 'body()' method introduced
This commit is contained in:
Paul Klimov
2013-11-06 12:48:44 +02:00
parent b0c5981d42
commit 3d1a625cbb
4 changed files with 34 additions and 8 deletions

View File

@ -96,6 +96,16 @@ interface MessageInterface
*/
public function html($html);
/**
* Sets message HTML and plain text content.
* @param string|array $body varies method behavior depending on type:
* - string - the HTML body content, in this case text body will be composed from
* html one using [[strip_tags()]] function.
* - array - list of body contents for each body type in format: ['html' => 'htmlContent', 'text' => 'textContent']
* @return static self reference.
*/
public function body($body);
/**
* Attaches existing file to the email message.
* @param string $fileName full file name
@ -175,7 +185,7 @@ interface MessageInterface
* @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file.
* @return static self reference.
*/
public function body($view, $params = []);
public function renderBody($view, $params = []);
/**
* Returns string representation of this message.