1 | <?php |
||
17 | class ConsumerService |
||
18 | { |
||
19 | /** |
||
20 | * @var \ZBateson\MailMimeParser\Header\Part\HeaderPartFactory the |
||
21 | * HeaderPartFactory instance used to create HeaderParts. |
||
22 | */ |
||
23 | protected $partFactory; |
||
24 | |||
25 | /** |
||
26 | * @var \ZBateson\MailMimeParser\Header\Part\MimeLiteralPartFactory used for |
||
27 | * GenericConsumer instances. |
||
28 | */ |
||
29 | protected $mimeLiteralPartFactory; |
||
30 | |||
31 | /** |
||
32 | * Sets up the HeaderPartFactory member variable. |
||
33 | * |
||
34 | * @param HeaderPartFactory $partFactory |
||
35 | */ |
||
36 | 8 | public function __construct(HeaderPartFactory $partFactory, MimeLiteralPartFactory $mimeLiteralPartFactory) |
|
37 | { |
||
38 | 8 | $this->partFactory = $partFactory; |
|
39 | 8 | $this->mimeLiteralPartFactory = $mimeLiteralPartFactory; |
|
40 | 8 | } |
|
41 | |||
42 | /** |
||
43 | * Returns the AddressBaseConsumer singleton instance. |
||
44 | * |
||
45 | * @return \ZBateson\MailMimeParser\Header\Consumer\AddressBaseConsumer |
||
46 | */ |
||
47 | 1 | public function getAddressBaseConsumer() |
|
48 | { |
||
49 | 1 | return AddressBaseConsumer::getInstance($this, $this->partFactory); |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * Returns the AddressConsumer singleton instance. |
||
54 | * |
||
55 | * @return \ZBateson\MailMimeParser\Header\Consumer\AddressConsumer |
||
56 | */ |
||
57 | 1 | public function getAddressConsumer() |
|
58 | { |
||
59 | 1 | return AddressConsumer::getInstance($this, $this->partFactory); |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * Returns the AddressGroupConsumer singleton instance. |
||
64 | * |
||
65 | * @return \ZBateson\MailMimeParser\Header\Consumer\AddressGroupConsumer |
||
66 | */ |
||
67 | 1 | public function getAddressGroupConsumer() |
|
71 | |||
72 | /** |
||
73 | * Returns the CommentConsumer singleton instance. |
||
74 | * |
||
75 | * @return \ZBateson\MailMimeParser\Header\Consumer\CommentConsumer |
||
76 | */ |
||
77 | 1 | public function getCommentConsumer() |
|
81 | |||
82 | /** |
||
83 | * Returns the GenericConsumer singleton instance. |
||
84 | * |
||
85 | * @return \ZBateson\MailMimeParser\Header\Consumer\GenericConsumer |
||
86 | */ |
||
87 | 1 | public function getGenericConsumer() |
|
91 | |||
92 | /** |
||
93 | * Returns the SubjectConsumer singleton instance. |
||
94 | * |
||
95 | * @return \ZBateson\MailMimeParser\Header\Consumer\SubjectConsumer |
||
96 | */ |
||
97 | public function getSubjectConsumer() |
||
101 | |||
102 | /** |
||
103 | * Returns the QuotedStringConsumer singleton instance. |
||
104 | * |
||
105 | * @return \ZBateson\MailMimeParser\Header\Consumer\QuotedStringConsumer |
||
106 | */ |
||
107 | 1 | public function getQuotedStringConsumer() |
|
111 | |||
112 | /** |
||
113 | * Returns the DateConsumer singleton instance. |
||
114 | * |
||
115 | * @return \ZBateson\MailMimeParser\Header\Consumer\DateConsumer |
||
116 | */ |
||
117 | 1 | public function getDateConsumer() |
|
121 | |||
122 | /** |
||
123 | * Returns the ParameterConsumer singleton instance. |
||
124 | * |
||
125 | * @return \ZBateson\MailMimeParser\Header\Consumer\ParameterConsumer |
||
126 | */ |
||
127 | 1 | public function getParameterConsumer() |
|
131 | } |
||
132 |