1 | <?php |
||
13 | class IcalFormatter { |
||
14 | |||
15 | /** |
||
16 | * @var IcalTimezoneFormatter |
||
17 | */ |
||
18 | private $icalTimezoneFormatter; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $calendarName; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $description; |
||
29 | |||
30 | /** |
||
31 | * @var [] |
||
32 | */ |
||
33 | private $events = []; |
||
34 | |||
35 | /** |
||
36 | * @since 3.0 |
||
37 | */ |
||
38 | 5 | public function __construct( IcalTimezoneFormatter $icalTimezoneFormatter ) { |
|
41 | |||
42 | /** |
||
43 | * @since 3.2 |
||
44 | * |
||
45 | * @param string $calendarName |
||
46 | */ |
||
47 | 4 | public function setCalendarName( $calendarName ) { |
|
50 | |||
51 | /** |
||
52 | * @since 3.2 |
||
53 | * |
||
54 | * @param string $description |
||
55 | */ |
||
56 | 4 | public function setDescription( $description ) { |
|
59 | |||
60 | /** |
||
61 | * @since 3.2 |
||
62 | * |
||
63 | * @param array $params |
||
64 | */ |
||
65 | 4 | public function addEvent( array $params ) { |
|
108 | |||
109 | /** |
||
110 | * @since 3.2 |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | 4 | public function getIcal() { |
|
139 | |||
140 | /** |
||
141 | * Implements esaping of special characters for iCalendar properties of type |
||
142 | * TEXT. This is defined in RFC2445 Section 4.3.21. |
||
143 | */ |
||
144 | 4 | private function escape( $text ) { |
|
148 | |||
149 | } |
||
150 |