PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 1.5.21
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v1.5.21
2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 1.7.2 All 33 releases
fluent-booking / app / Services / Libs / RRule / RRuleInterface.php

RRuleInterface.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution 1.5.21, at app/Services/Libs/RRule/RRuleInterface.php

106 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Licensed under the MIT license.
5 *
6 * For the full copyright and license information, please view the LICENSE file.
7 *
8 * @author Rémi Lanvin <remi@cloudconnected.fr>
9 * @link https://github.com/rlanvin/php-rrule
10 */
11
12 namespace FluentBooking\App\Services\Libs\RRule;
13
14 /**
15 * Common interface for RRule and RSet objects
16 */
17 interface RRuleInterface extends \ArrayAccess, \Countable, \IteratorAggregate
18 {
19 /**
20 * Return all the occurrences in an array of \DateTime.
21 *
22 * @param int $limit Limit the resultset to n occurrences (0, null or false = everything)
23 * @return array An array of \DateTime objects
24 */
25 public function getOccurrences($limit = null);
26
27 /**
28 * Return all the ocurrences after a date, before a date, or between two dates.
29 *
30 * @param mixed $begin Can be null to return all occurrences before $end
31 * @param mixed $end Can be null to return all occurrences after $begin
32 * @param int|null $limit Limit the resultset to n occurrences (0, null or false = everything)
33 * @return array An array of \DateTime objects
34 */
35 public function getOccurrencesBetween($begin, $end, $limit = null);
36
37 /**
38 * Return all the occurrences after a date.
39 *
40 * @param mixed $date
41 * @param bool $inclusive Whether or not to include $date (if date is an occurrence)
42 * @param int|null $limit Limit the resultset to n occurrences (0, null or false = everything)
43 * @return array
44 */
45 public function getOccurrencesAfter($date, $inclusive = false, $limit = null);
46
47 /**
48 * Return the Nth occurrences after a date (non inclusive)
49 *
50 * @param mixed $date
51 * @param int $index The index (starts at 1)
52 * @return \DateTimeInterface|null
53 */
54 public function getNthOccurrenceAfter($date, $index);
55
56 /**
57 * Return all the occurrences before a date.
58 *
59 * @param mixed $date
60 * @param bool $inclusive Whether or not to include $date (if date is an occurrence)
61 * @param int|null $limit Limit the resultset to n occurrences (0, null or false = everything)
62 * @return array
63 */
64 public function getOccurrencesBefore($date, $inclusive = false, $limit = null);
65
66 /**
67 * Return the Nth occurrences before a date (non inclusive)
68 *
69 * @param mixed $date
70 * @param int $index The index (starts at 1)
71 * @return \DateTimeInterface|null
72 */
73 public function getNthOccurrenceBefore($date, $index);
74
75 /**
76 * Return the Nth occurrences before or after a date.
77 *
78 * @param mixed $date
79 * @param int $index 0 returns the date, positive integer returns index in the future, negative in the past
80 * @return \DateTimeInterface|null
81 */
82 public function getNthOccurrenceFrom($date, $index);
83
84 /**
85 * Return true if $date is an occurrence.
86 *
87 * @param mixed $date
88 * @return bool
89 */
90 public function occursAt($date);
91
92 /**
93 * Return true if the rrule has an end condition, false otherwise
94 *
95 * @return bool
96 */
97 public function isFinite();
98
99 /**
100 * Return true if the rrule has no end condition (infite)
101 *
102 * @return bool
103 */
104 public function isInfinite();
105 }
106