Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
namespace core\test;
18
 
19
/**
20
 * Generic message interface.
21
 *
22
 * @package    core
23
 * @category   test
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 * @copyright  Simey Lameze <simey@moodle.com>
26
 */
27
interface message {
28
 
29
    /**
30
     * Get the message subject.
31
     *
32
     * @return string
33
     */
34
    public function get_subject(): string;
35
 
36
    /**
37
     * Get the text representation of the body, if one was provided.
38
     *
39
     * @return null|string
40
     */
41
    public function get_body_text(): ?string;
42
 
43
    /**
44
     * Get the HTML representation of the body, if one was provided.
45
     *
46
     * @return null|string
47
     */
48
    public function get_body_html(): ?string;
49
 
50
    /**
51
     * Get the message sender.
52
     *
53
     * @return message_user
54
     */
55
    public function get_sender(): message_user;
56
 
57
    /**
58
     * Get the message recipients.
59
     *
60
     * @return iterable<message_user>
61
     */
62
    public function get_recipients(): iterable;
63
 
64
    /**
65
     * Whether the message has the specified recipient.
66
     *
67
     * @param string $email The email address.
68
     * @return bool
69
     */
70
    public function has_recipient(string $email): bool;
71
 
72
    /**
73
     * Get the message cc recipients.
74
     *
75
     * @return iterable<message_user>
76
     */
77
    public function get_cc(): iterable;
78
 
79
    /**
80
     * Get the message cc recipients.
81
     *
82
     * @return iterable<message_user>
83
     */
84
    public function get_bcc(): iterable;
85
}