Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
u01jmg3 committed Nov 28, 2016
1 parent 56aa9a1 commit 2574be2
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,34 @@ $ curl -s https://getcomposer.org/installer | php

## API

|Function |Parameter(s) |Description |
|-------------------------|------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|`initLines` |`$lines` |Initialises lines from file |
|`initString` |`$contents` |Initialises lines from a string |
|`initURL` |`$url` |Initialises lines from a URL |
|`calendarDescription` |- |Returns the calendar description |
|`calendarName` |- |Returns the calendar name |
|`calendarTimeZone` |- |Returns the calendar timezone |
|`events` |- |Returns an array of EventObjects. Every event is a class with the event details being properties within it. |
|`eventsFromRange` |`$rangeStart = false`, `$rangeEnd = false`|Returns a sorted array of the events in a given range, or an empty array if no events exist in the range. |
|`eventsFromInterval` |`$interval` |Returns a sorted array of the events following a given string, or false if no events exist in the range. |
|`freeBusyEvents` |- |Returns an array of arrays with all free/busy events. Every event is an associative array and each property is an element it.|
|`hasEvents` |- |Returns a boolean value whether the current calendar has events or not |
|`iCalDateToUnixTimestamp`|`$icalDate` |Return Unix timestamp from iCal date time format |
|`iCalDateWithTimeZone` |`$event`, `$key` |Return a date adapted to the calendar timezone depending on the event TZID |
|`isValidTimeZoneId` |`$timezone` |Check if a timezone is valid |
|`processDateConversions` |- |Add fields `DTSTART_tz` and `DTEND_tz` to each event |
|`processEvents` |- |Performs some admin tasks on all events as taken straight from the ics file. |
|`processRecurrences` |- |Processes recurrence rules |
|`sortEventsWithOrder` |`$events`, `$sortOrder = SORT_ASC` |Sort events based on a given sort order |
### `ICal` API

| Function | Parameter(s) | Description |
|---------------------------|--------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| `initLines` | `$lines` | Initialises lines from file |
| `initString` | `$contents` | Initialises lines from a string |
| `initURL` | `$url` | Initialises lines from a URL |
| `calendarDescription` | - | Returns the calendar description |
| `calendarName` | - | Returns the calendar name |
| `calendarTimeZone` | - | Returns the calendar timezone |
| `events` | - | Returns an array of EventObjects. Every event is a class with the event details being properties within it. |
| `eventsFromRange` | `$rangeStart = false`, `$rangeEnd = false` | Returns a sorted array of the events in a given range, or an empty array if no events exist in the range. |
| `eventsFromInterval` | `$interval` | Returns a sorted array of the events following a given string, or false if no events exist in the range. |
| `freeBusyEvents` | - | Returns an array of arrays with all free/busy events. Every event is an associative array and each property is an element it. |
| `hasEvents` | - | Returns a boolean value whether the current calendar has events or not |
| `iCalDateToUnixTimestamp` | `$icalDate` | Return Unix timestamp from iCal date time format |
| `iCalDateWithTimeZone` | `$event`, `$key` | Return a date adapted to the calendar timezone depending on the event TZID |
| `isValidTimeZoneId` | `$timezone` | Check if a timezone is valid |
| `processDateConversions` | - | Add fields `DTSTART_tz` and `DTEND_tz` to each event |
| `processEvents` | - | Performs some admin tasks on all events as taken straight from the ics file. |
| `processRecurrences` | - | Processes recurrence rules |
| `sortEventsWithOrder` | `$events`, `$sortOrder = SORT_ASC` | Sort events based on a given sort order |

### `EventObject` API

| Function | Parameter(s) | Description |
|-------------|---------------------------|--------------------------------------------------------------------|
| `printData` | `$html = '<p>%s: %s</p>'` | Return Event data excluding anything blank within an HTML template |

--

Expand Down

0 comments on commit 2574be2

Please sign in to comment.