1 | <?php |
||
9 | class Calendar |
||
10 | { |
||
11 | /** |
||
12 | * Canvas calendar context |
||
13 | * @var CalendarContext |
||
14 | */ |
||
15 | protected $context; |
||
16 | |||
17 | /** |
||
18 | * ICS or webcal feed URL |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $feedUrl; |
||
22 | |||
23 | /** |
||
24 | * Name of this calendar (extracted from feed) |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $name; |
||
28 | |||
29 | /** |
||
30 | * Filter for events in this calendar |
||
31 | * @var Filter |
||
32 | */ |
||
33 | protected $filter; |
||
34 | |||
35 | /** |
||
36 | * Construct a Calendar object |
||
37 | * |
||
38 | * @param string $canvasUrl URL of a Canvas calendar context |
||
39 | * @param string $feedUrl URL of a webcal or ICS calendar feed |
||
40 | * @param boolean $enableFilter (Optional, default `false`) |
||
41 | * @param string $include (Optional) Regular expression to select events |
||
42 | * for inclusion in the calendar sync |
||
43 | * @param string $exclude (Optional) Regular expression to select events |
||
44 | * for exclusion from the calendar sync |
||
45 | */ |
||
46 | public function __construct($canvasUrl, $feedUrl, $enableFilter = false, $include = null, $exclude = null) |
||
56 | |||
57 | /** |
||
58 | * Set the Canvas calendar context |
||
59 | * |
||
60 | * @param CalendarContext $context |
||
61 | * @throws Exception If `$context` is null |
||
62 | */ |
||
63 | public function setContext(CalendarContext $context) |
||
73 | |||
74 | /** |
||
75 | * Get the Canvas calendar context |
||
76 | * |
||
77 | * @return CalendarContext |
||
78 | */ |
||
79 | public function getContext() |
||
83 | |||
84 | /** |
||
85 | * Set the webcal or ICS feed URl for this calendar |
||
86 | * |
||
87 | * @param string $feedUrl |
||
88 | * @throws Exception If `$feedUrl` is not a valid URL |
||
89 | */ |
||
90 | public function setFeedUrl($feedUrl) |
||
103 | |||
104 | /** |
||
105 | * Get the feed URL for this calendar |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getFeedUrl() |
||
113 | |||
114 | /** |
||
115 | * Set the name of the calendar |
||
116 | * |
||
117 | * @param string $name |
||
118 | */ |
||
119 | public function setName($name) |
||
123 | |||
124 | /** |
||
125 | * Get the name of the calendar |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getName() |
||
133 | |||
134 | /** |
||
135 | * Set the regular expression filter for this calendar |
||
136 | * |
||
137 | * @param Filter $filter |
||
138 | */ |
||
139 | public function setFilter(Filter $filter) |
||
143 | |||
144 | /** |
||
145 | * Get the regular expression filter for this calendar |
||
146 | * |
||
147 | * @return Filter |
||
148 | */ |
||
149 | public function getFilter() |
||
153 | |||
154 | /** |
||
155 | * Generate a unique ID to identify this particular pairing of ICS feed and |
||
156 | * Canvas calendar |
||
157 | **/ |
||
158 | protected function getId($algorithm = 'md5') |
||
162 | |||
163 | public function getContextCode() |
||
167 | |||
168 | public function save() |
||
227 | |||
228 | /** |
||
229 | * Load a Calendar from the database |
||
230 | * |
||
231 | * @param int $id |
||
232 | * @return Calendar |
||
233 | */ |
||
234 | public static function load($id) |
||
251 | |||
252 | public function sync(Log $log) |
||
325 | |||
326 | private function log($message, Log $log, $flag = PEAR_LOG_INFO) |
||
332 | |||
333 | private function logThrow( |
||
344 | } |
||
345 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.