1 | <?php |
||
21 | class MailServiceOptions extends SmtpOptions |
||
22 | { |
||
23 | /** |
||
24 | * Local client hostname. used in the elho chalange |
||
25 | * |
||
26 | * @var string $name |
||
27 | */ |
||
28 | protected $name = 'localhost'; |
||
29 | |||
30 | /** |
||
31 | * Fully-qualified classname or short name resolvable via Zend\Mail\Protocol\SmtpLoader. |
||
32 | * Typically, this will be one of “smtp”, “plain”, “login”, or “crammd5”, and defaults to “smtp”. |
||
33 | * |
||
34 | * @var string $connectionClass |
||
35 | */ |
||
36 | protected $connectionClass = 'plain'; |
||
37 | |||
38 | /** |
||
39 | * Mail transport. Possible Values "smtp", "sendmail","file". |
||
40 | * If "sendmail" is used, YAWIK will use the php mail() function |
||
41 | * for sending mails. This requires a local MTA. |
||
42 | * |
||
43 | * If "file" is used, YAWIK will use FileTransport class |
||
44 | * to be able to test mail functionality |
||
45 | * |
||
46 | * https://docs.zendframework.com/zend-mail/transport/intro/#configuration-options |
||
47 | * |
||
48 | * @var string $transportClass |
||
49 | */ |
||
50 | protected $transportClass = 'sendmail'; |
||
51 | |||
52 | /** |
||
53 | * Connection configuration (passed to the underlying Protocol class) |
||
54 | * |
||
55 | * @var array |
||
56 | */ |
||
57 | protected $connectionConfig = []; |
||
58 | |||
59 | /** |
||
60 | * Remote hostname or IP address; defaults to “127.0.0.1”. |
||
61 | * |
||
62 | * @var string $host |
||
63 | */ |
||
64 | protected $host = '127.0.0.1'; |
||
65 | |||
66 | /** |
||
67 | * @var int |
||
68 | */ |
||
69 | protected $port = 25; |
||
70 | |||
71 | /** |
||
72 | * 'tls', 'ssl' or null |
||
73 | * |
||
74 | * @var string $ssl |
||
75 | */ |
||
76 | protected $ssl; |
||
77 | |||
78 | /** |
||
79 | * @var string $username |
||
80 | */ |
||
81 | protected $username; |
||
82 | |||
83 | /** |
||
84 | * @var string $password |
||
85 | */ |
||
86 | protected $password; |
||
87 | |||
88 | /** |
||
89 | * @var string Path to stored mail files |
||
90 | * @see FileOptions::setPath() |
||
91 | */ |
||
92 | protected $path; |
||
93 | |||
94 | |||
95 | public function setUsername($username) { |
||
101 | |||
102 | public function getUsername(){ |
||
105 | |||
106 | public function setPassword($password) { |
||
112 | |||
113 | public function getPassword(){ |
||
116 | |||
117 | public function setSsl($ssl) { |
||
123 | |||
124 | public function getSsl(){ |
||
127 | |||
128 | public function setTransportClass($transportClass) { |
||
132 | |||
133 | public function getTransportClass(){ |
||
136 | |||
137 | /** |
||
138 | * @return string |
||
|
|||
139 | */ |
||
140 | public function getPath() |
||
147 | |||
148 | /** |
||
149 | * @param string $path |
||
150 | * @return MailServiceOptions |
||
151 | */ |
||
152 | public function setPath($path) |
||
161 | } |
||
162 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.