forked from lochmueller/calendarize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The methodes of ICalEvent regarding the date options / configuration are now split into an seperate interface. In addition to that the getRRule() methode was added, which returns the RRULE property as an key-value array of recur-rule-parts.
- Loading branch information
Showing
5 changed files
with
140 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace HDNET\Calendarize\Ical; | ||
|
||
/** | ||
* Provides the methods to hydrate a Configuration object. | ||
* Used to create a Configuration based on an iCalendar VEVENT. | ||
* | ||
* Interface EventConfigurationInterface | ||
*/ | ||
interface EventConfigurationInterface | ||
{ | ||
/** | ||
* Value for starTime if the event is allDay. | ||
*/ | ||
public const ALLDAY_START_TIME = 0; | ||
/** | ||
* Value for endTime if the event is allDay. | ||
*/ | ||
public const ALLDAY_END_TIME = 0; | ||
|
||
/** | ||
* Get the start date. | ||
* The date is converted to the local timezone and set to the beginning of the day. | ||
* | ||
* @return \DateTime|null | ||
*/ | ||
public function getStartDate(): ?\DateTime; | ||
|
||
/** | ||
* Get the inclusive end date. | ||
* The date is converted to the local timezone and set to the beginning of the day. | ||
* | ||
* @return \DateTime|null | ||
*/ | ||
public function getEndDate(): ?\DateTime; | ||
|
||
/** | ||
* Get start time. | ||
* The time is calculated in the local timezone. | ||
* | ||
* @return int | ||
*/ | ||
public function getStartTime(): int; | ||
|
||
/** | ||
* Get end time. | ||
* The time is calculated in the local timezone. | ||
* | ||
* @return int | ||
*/ | ||
public function getEndTime(): int; | ||
|
||
/** | ||
* Get allDay. | ||
* | ||
* The "VEVENT" is also the calendar component used to specify an | ||
* anniversary or daily reminder within a calendar. These events | ||
* have a DATE value type for the "DTSTART" property instead of the | ||
* default value type of DATE-TIME. If such a "VEVENT" has a "DTEND" | ||
* property, it MUST be specified as a DATE value also. | ||
* | ||
* @return bool | ||
*/ | ||
public function isAllDay(): bool; | ||
|
||
/** | ||
* Get openEndTime. | ||
* | ||
* @return bool | ||
*/ | ||
public function isOpenEndTime(): bool; | ||
|
||
/** | ||
* Get state. | ||
* | ||
* @return string | ||
*/ | ||
public function getState(): string; | ||
|
||
/** | ||
* Get repeating rules. | ||
* | ||
* @return array | ||
*/ | ||
public function getRRule(): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters