blob: 89cafa388c602e5edfc1c93510a12935e11dd124 (
plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
<?php
/**
* Copyright (c) 2012 Georg Ehrke <ownclouddev@georgswebsite.de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
/*
* This class manages the caching of repeating events
* Events will be cached for the current year ± 5 years
*/
class OC_Calendar_Repeat{
/*
* @brief returns the cache of an event
* @param (int) $id - id of the event
* @return (array)
*/
public static function get($id){
$stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE eventid = ?');
$result = $stmt->execute(array($id));
$return = array();
while($row = $result->fetchRow()){
$return[] = $row;
}
return $return;
}
/*
* @brief returns the cache of an event in a specific peroid
* @param (int) $id - id of the event
* @param (string) $from - start for period in UTC
* @param (string) $until - end for period in UTC
* @return (array)
*/
public static function get_inperiod($id, $from, $until){
}
/*
* @brief returns the cache of all repeating events of a calendar
* @param (int) $id - id of the calendar
* @return (array)
*/
public static function getcalendar($id){
}
/*
* @brief returns the cache of all repeating events of a calendar in a specific period
* @param (int) $id - id of the event
* @param (string) $from - start for period in UTC
* @param (string) $until - end for period in UTC
*/
public static function getcalendar_inperiod($id, $from, $until){
}
/*
* @brief generates the cache the first time
*/
public static function generate($id){
}
/*
* @brief generates the cache the first time for all repeating event of an calendar
*/
public static function generatecalendar($id){
}
/*
* @brief updates an event that is already cached
*/
public static function update($id){
}
/*
* @brief updates all repating events of a calendar that are already cached
*/
public static function updatecalendar($id){
}
/*
* @brief checks if an event is already cached
*/
public static function is_cached($id){
}
/*
* @brief checks if a whole calendar is already cached
*/
public static function is_calendar_cached($id){
}
/*
* @brief removes the cache of an event
*/
public static function clean($id){
}
/*
* @brief removes the cache of all events of a calendar
*/
public static function cleancalendar($id){
}
}
|