-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mail.php
72 lines (64 loc) · 1.41 KB
/
Mail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Mail
*
* Модуль для работы с почтовыми письмами
*
* В модуль входят классы для формирования, кодирования и отправки сообщений
*
* @package Mail
* @version 0.2.0
*/
/**
* @package Mail
*/
class Mail implements Core_ModuleInterface
{
const MODULE = 'Mail';
const VERSION = '0.2.0';
/**
* Инициализация
*
*/
static public function initialize()
{
Core::load('Mail.Message', 'Mail.Serialize', 'Mail.Transport');
}
/**
* Фабричный метод, возвращает объект класса Mail.Message.Message
*
* @return Mail_Message_Message
*/
static public function Message()
{
return new Mail_Message_Message();
}
/**
* Фабричный метод, возвращает объект класса Mail.Message.Part
*
* @return Mail_Message_Part
*/
static public function Part()
{
return new Mail_Message_Part();
}
/**
* Фабричный метод, возвращает объект класса Mail.Message.Serializer
*
* @param IO_Strem_AbstractStream $strem
*
* @return Mail_Message_Serializer
*/
static public function Encoder(IO_Stream_AbstractStream $stream = null)
{
return new Mail_Serialize_Encoder($stream);
}
}
/**
* Класс исключения
*
* @package Mail
*/
class Mail_Exception extends Core_Exception
{
}