1 | <?php |
||
5 | class Calendar |
||
6 | { |
||
7 | /** |
||
8 | * Canvas calendar context |
||
9 | * @var CalendarContext |
||
10 | */ |
||
11 | protected $context; |
||
12 | |||
13 | /** |
||
14 | * ICS or webcal feed URL |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $feedUrl; |
||
18 | |||
19 | /** |
||
20 | * Name of this calendar (extracted from feed) |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name; |
||
24 | |||
25 | /** |
||
26 | * Filter for events in this calendar |
||
27 | * @var Filter |
||
28 | */ |
||
29 | protected $filter; |
||
30 | |||
31 | /** |
||
32 | * Construct a Calendar object |
||
33 | * |
||
34 | * @param string $canvasUrl URL of a Canvas calendar context |
||
35 | * @param string $feedUrl URL of a webcal or ICS calendar feed |
||
36 | * @param boolean $enableFilter (Optional, default `false`) |
||
37 | * @param string $include (Optional) Regular expression to select events |
||
38 | * for inclusion in the calendar sync |
||
39 | * @param string $exclude (Optional) Regular expression to select events |
||
40 | * for exclusion from the calendar sync |
||
41 | */ |
||
42 | public function __construct($canvasUrl, $feedUrl, $enableFilter = false, $include = null, $exclude = null) |
||
52 | |||
53 | /** |
||
54 | * Set the Canvas calendar context |
||
55 | * |
||
56 | * @param CalendarContext $context |
||
57 | * @throws Exception If `$context` is null |
||
58 | */ |
||
59 | public function setContext(CalendarContext $context) |
||
69 | |||
70 | /** |
||
71 | * Get the Canvas calendar context |
||
72 | * |
||
73 | * @return CalendarContext |
||
74 | */ |
||
75 | public function getContext() |
||
79 | |||
80 | /** |
||
81 | * Set the webcal or ICS feed URl for this calendar |
||
82 | * |
||
83 | * @param string $feedUrl |
||
84 | * @throws Exception If `$feedUrl` is not a valid URL |
||
85 | */ |
||
86 | public function setFeedUrl($feedUrl) |
||
99 | |||
100 | /** |
||
101 | * Get the feed URL for this calendar |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getFeedUrl() |
||
109 | |||
110 | /** |
||
111 | * Set the name of the calendar |
||
112 | * |
||
113 | * @param string $name |
||
114 | */ |
||
115 | public function setName($name) |
||
119 | |||
120 | /** |
||
121 | * Get the name of the calendar |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getName() |
||
129 | |||
130 | /** |
||
131 | * Set the regular expression filter for this calendar |
||
132 | * |
||
133 | * @param Filter $filter |
||
134 | */ |
||
135 | public function setFilter(Filter $filter) |
||
139 | |||
140 | /** |
||
141 | * Get the regular expression filter for this calendar |
||
142 | * |
||
143 | * @return Filter |
||
144 | */ |
||
145 | public function getFilter() |
||
149 | |||
150 | /** |
||
151 | * Generate a unique ID to identify this particular pairing of ICS feed and |
||
152 | * Canvas calendar |
||
153 | **/ |
||
154 | protected function getPairingHash() |
||
159 | |||
160 | public function save() |
||
205 | |||
206 | /** |
||
207 | * Load a Calendar from the MySQL database |
||
208 | * |
||
209 | * @param int $id |
||
210 | * @return Calendar |
||
211 | */ |
||
212 | public static function load($id) |
||
223 | } |
||
224 |
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.