generated from yii-tools/template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9aa65e
commit a2c0ea3
Showing
5 changed files
with
136 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'yii-tools.service.mailer.from' => '', | ||
'yii-tools.service.mailer.signature-image' => '', | ||
'yii-tools.service.mailer.signature-text' => '', | ||
'yii-tools.service.mailer.translator-category' => 'app', | ||
'yii-tools.service.mailer.view-path' => '', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yii\Service; | ||
|
||
/** | ||
* Provides a way to send email messages. | ||
*/ | ||
interface MailerInterface | ||
{ | ||
/** | ||
* Returns a new instance with the specified attachments. | ||
* | ||
* @param array $value Attachments. | ||
* | ||
* @psalm-param string[] $value | ||
*/ | ||
public function attachments(array $value): self; | ||
|
||
/** | ||
* Returns a new instance with the specified from. | ||
* | ||
* @param string $value From. | ||
*/ | ||
public function from(string $value): self; | ||
|
||
/** | ||
* Returns a new instance with the specified layout. | ||
* | ||
* @param array $value Layout. | ||
* | ||
* @psalm-param array<string, string>|string|null $value | ||
*/ | ||
public function layout(array|string|null $value): self; | ||
|
||
/** | ||
* Sends an email. | ||
* | ||
* @param string $email Email. | ||
* @param array $params Params. | ||
*/ | ||
public function send(string $email, array $params = []): bool; | ||
|
||
/** | ||
* Returns a new instance with the specified signature image. | ||
* | ||
* @param string $value Signature image. | ||
*/ | ||
public function signatureImage(string $value): self; | ||
|
||
/** | ||
* Returns a new instance with the specified signature text. | ||
* | ||
* @param string $value Signature text. | ||
*/ | ||
public function signatureText(string $value): self; | ||
|
||
/** | ||
* Returns a new instance with the specified subject. | ||
* | ||
* @param string $value Subject. | ||
*/ | ||
public function subject(string $value): self; | ||
|
||
/** | ||
* Returns a new instance with the specified translator category. | ||
* | ||
* @param string $value Translator category. | ||
*/ | ||
public function translatorCategory(string $value): self; | ||
|
||
/** | ||
* Returns a new instance with the specified view path. | ||
* | ||
* @param string $value View path. | ||
*/ | ||
public function viewPath(string $value): self; | ||
} |