|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Facades for Yii 2 |
|
4
|
|
|
* |
|
5
|
|
|
* Generated on Yii 2.0.12 |
|
6
|
|
|
* |
|
7
|
|
|
* @see https://github.com/sergeymakinen/yii2-facades |
|
8
|
|
|
* @copyright Copyright (c) 2016-2017 Sergey Makinen (https://makinen.ru) |
|
9
|
|
|
* @license https://github.com/sergeymakinen/yii2-facades/blob/master/LICENSE The MIT License |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace sergeymakinen\facades; |
|
13
|
|
|
|
|
14
|
|
|
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */ |
|
15
|
|
|
/** |
|
16
|
|
|
* Yii::$app->get('mailer') facade. |
|
17
|
|
|
* |
|
18
|
|
|
* Methods |
|
19
|
|
|
* |
|
20
|
|
|
* @method static \yii\base\Behavior attachBehavior(string $name, string|array|\yii\base\Behavior $behavior) Attaches a behavior to this component. |
|
21
|
|
|
* @see \yii\base\Component::attachBehavior |
|
22
|
|
|
* |
|
23
|
|
|
* @method static void attachBehaviors(array $behaviors) Attaches a list of behaviors to the component. |
|
24
|
|
|
* @see \yii\base\Component::attachBehaviors |
|
25
|
|
|
* |
|
26
|
|
|
* @method static array behaviors() Returns a list of behaviors that this component should behave as. |
|
27
|
|
|
* @see \yii\base\Component::behaviors |
|
28
|
|
|
* |
|
29
|
|
|
* @method static \yii\mail\MessageInterface compose(string|array|null $view = null, array $params = []) Creates a new message instance and optionally composes its body content via view rendering. |
|
30
|
|
|
* @see \yii\mail\BaseMailer::compose |
|
31
|
|
|
* |
|
32
|
|
|
* @method static null|\yii\base\Behavior detachBehavior(string $name) Detaches a behavior from the component. |
|
33
|
|
|
* @see \yii\base\Component::detachBehavior |
|
34
|
|
|
* |
|
35
|
|
|
* @method static void detachBehaviors() Detaches all behaviors from the component. |
|
36
|
|
|
* @see \yii\base\Component::detachBehaviors |
|
37
|
|
|
* |
|
38
|
|
|
* @method static void ensureBehaviors() Makes sure that the behaviors declared in [[behaviors()]] are attached to this component. |
|
39
|
|
|
* @see \yii\base\Component::ensureBehaviors |
|
40
|
|
|
* |
|
41
|
|
|
* @method static string generateMessageFileName() |
|
42
|
|
|
* @see \yii\mail\BaseMailer::generateMessageFileName |
|
43
|
|
|
* |
|
44
|
|
|
* @method static null|\yii\base\Behavior getBehavior(string $name) Returns the named behavior object. |
|
45
|
|
|
* @see \yii\base\Component::getBehavior |
|
46
|
|
|
* |
|
47
|
|
|
* @method static \yii\base\Behavior[] getBehaviors() Returns all behaviors attached to this component. |
|
48
|
|
|
* @see \yii\base\Component::getBehaviors |
|
49
|
|
|
* |
|
50
|
|
|
* @method static array|\Swift_Mailer getSwiftMailer() |
|
51
|
|
|
* @see \yii\swiftmailer\Mailer::getSwiftMailer |
|
52
|
|
|
* |
|
53
|
|
|
* @method static array|\Swift_Transport getTransport() |
|
54
|
|
|
* @see \yii\swiftmailer\Mailer::getTransport |
|
55
|
|
|
* |
|
56
|
|
|
* @method static \yii\web\View getView() |
|
57
|
|
|
* @see \yii\mail\BaseMailer::getView |
|
58
|
|
|
* |
|
59
|
|
|
* @method static string getViewPath() |
|
60
|
|
|
* @see \yii\mail\BaseMailer::getViewPath |
|
61
|
|
|
* |
|
62
|
|
|
* @method static bool hasEventHandlers(string $name) Returns a value indicating whether there is any handler attached to the named event. |
|
63
|
|
|
* @see \yii\base\Component::hasEventHandlers |
|
64
|
|
|
* |
|
65
|
|
|
* @method static bool off(string $name, callable $handler = null) Detaches an existing event handler from this component. |
|
66
|
|
|
* @see \yii\base\Component::off |
|
67
|
|
|
* |
|
68
|
|
|
* @method static void on(string $name, callable $handler, mixed $data = null, bool $append = true) Attaches an event handler to an event. |
|
69
|
|
|
* @see \yii\base\Component::on |
|
70
|
|
|
* |
|
71
|
|
|
* @method static string render(string $view, array $params = [], string|bool $layout = false) Renders the specified view with optional parameters and layout. |
|
72
|
|
|
* @see \yii\mail\BaseMailer::render |
|
73
|
|
|
* |
|
74
|
|
|
* @method static bool send(\yii\mail\MessageInterface $message) Sends the given email message. |
|
75
|
|
|
* @see \yii\mail\BaseMailer::send |
|
76
|
|
|
* |
|
77
|
|
|
* @method static int sendMultiple(array $messages) Sends multiple messages at once. |
|
78
|
|
|
* @see \yii\mail\BaseMailer::sendMultiple |
|
79
|
|
|
* |
|
80
|
|
|
* @method static void setTransport(array|\Swift_Transport $transport) |
|
81
|
|
|
* @see \yii\swiftmailer\Mailer::setTransport |
|
82
|
|
|
* |
|
83
|
|
|
* @method static void setView(array|\yii\web\View $view) |
|
84
|
|
|
* @see \yii\mail\BaseMailer::setView |
|
85
|
|
|
* |
|
86
|
|
|
* @method static void setViewPath(string $path) |
|
87
|
|
|
* @see \yii\mail\BaseMailer::setViewPath |
|
88
|
|
|
* |
|
89
|
|
|
* @method static void trigger(string $name, \yii\base\Event $event = null) Triggers an event. |
|
90
|
|
|
* @see \yii\base\Component::trigger |
|
91
|
|
|
* |
|
92
|
|
|
* Property accessors |
|
93
|
|
|
* |
|
94
|
|
|
* @method static bool getEnableSwiftMailerLogging() Returns whether to enable writing of the SwiftMailer internal logs using Yii log mechanism. |
|
95
|
|
|
* @see \yii\swiftmailer\Mailer::enableSwiftMailerLogging |
|
96
|
|
|
* |
|
97
|
|
|
* @method static callable getFileTransportCallback() Returns a PHP callback that will be called by [[send()]] when [[useFileTransport]] is true. |
|
98
|
|
|
* @see \yii\mail\BaseMailer::fileTransportCallback |
|
99
|
|
|
* |
|
100
|
|
|
* @method static string getFileTransportPath() Returns the directory where the email messages are saved when [[useFileTransport]] is true. |
|
101
|
|
|
* @see \yii\mail\BaseMailer::fileTransportPath |
|
102
|
|
|
* |
|
103
|
|
|
* @method static string|bool getHtmlLayout() Returns HTML layout view name. |
|
104
|
|
|
* @see \yii\mail\BaseMailer::htmlLayout |
|
105
|
|
|
* |
|
106
|
|
|
* @method static string getMessageClass() Returns message default class name. |
|
107
|
|
|
* @see \yii\swiftmailer\Mailer::messageClass |
|
108
|
|
|
* |
|
109
|
|
|
* @method static array getMessageConfig() Returns the configuration that should be applied to any newly created email message instance by [[createMessage()]] or [[compose()]]. |
|
110
|
|
|
* @see \yii\mail\BaseMailer::messageConfig |
|
111
|
|
|
* |
|
112
|
|
|
* @method static string|bool getTextLayout() Returns text layout view name. |
|
113
|
|
|
* @see \yii\mail\BaseMailer::textLayout |
|
114
|
|
|
* |
|
115
|
|
|
* @method static bool getUseFileTransport() Returns whether to save email messages as files under [[fileTransportPath]] instead of sending them to the actual recipients. |
|
116
|
|
|
* @see \yii\mail\BaseMailer::useFileTransport |
|
117
|
|
|
* |
|
118
|
|
|
* @method static void setEnableSwiftMailerLogging(bool $value) Sets whether to enable writing of the SwiftMailer internal logs using Yii log mechanism. |
|
119
|
|
|
* @see \yii\swiftmailer\Mailer::enableSwiftMailerLogging |
|
120
|
|
|
* |
|
121
|
|
|
* @method static void setFileTransportCallback(callable $value) Sets a PHP callback that will be called by [[send()]] when [[useFileTransport]] is true. |
|
122
|
|
|
* @see \yii\mail\BaseMailer::fileTransportCallback |
|
123
|
|
|
* |
|
124
|
|
|
* @method static void setFileTransportPath(string $value) Sets the directory where the email messages are saved when [[useFileTransport]] is true. |
|
125
|
|
|
* @see \yii\mail\BaseMailer::fileTransportPath |
|
126
|
|
|
* |
|
127
|
|
|
* @method static void setHtmlLayout(string|bool $value) Sets HTML layout view name. |
|
128
|
|
|
* @see \yii\mail\BaseMailer::htmlLayout |
|
129
|
|
|
* |
|
130
|
|
|
* @method static void setMessageClass(string $value) Sets message default class name. |
|
131
|
|
|
* @see \yii\swiftmailer\Mailer::messageClass |
|
132
|
|
|
* |
|
133
|
|
|
* @method static void setMessageConfig(array $value) Sets the configuration that should be applied to any newly created email message instance by [[createMessage()]] or [[compose()]]. |
|
134
|
|
|
* @see \yii\mail\BaseMailer::messageConfig |
|
135
|
|
|
* |
|
136
|
|
|
* @method static void setTextLayout(string|bool $value) Sets text layout view name. |
|
137
|
|
|
* @see \yii\mail\BaseMailer::textLayout |
|
138
|
|
|
* |
|
139
|
|
|
* @method static void setUseFileTransport(bool $value) Sets whether to save email messages as files under [[fileTransportPath]] instead of sending them to the actual recipients. |
|
140
|
|
|
* @see \yii\mail\BaseMailer::useFileTransport |
|
141
|
|
|
*/ |
|
142
|
|
|
class Mailer extends Facade |
|
143
|
|
|
{ |
|
144
|
|
|
/** |
|
145
|
|
|
* @inheritDoc |
|
146
|
|
|
*/ |
|
147
|
1 |
|
public static function getFacadeComponentId() |
|
148
|
|
|
{ |
|
149
|
1 |
|
return 'mailer'; |
|
150
|
|
|
} |
|
151
|
|
|
} |
|
152
|
|
|
|