davical/docs/api/awl/caldav/_inc---RRule-v2.php.html
Andrew McMillan 927a98482f Release 1.0.2
2012-01-14 10:46:56 +13:00

399 lines
16 KiB
HTML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page RRule-v2.php</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/RRule-v2.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
| <a href="#sec-constants">Constants</a>
| <a href="#sec-functions">Functions</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class for parsing RRule and getting us the dates</p>
<ul class="tags">
<li><span class="field">author:</span> Andrew McMillan &lt;<a href="mailto:andrew@mcmillan.net.nz">andrew@mcmillan.net.nz</a>&gt;</li>
<li><span class="field">copyright:</span> Morphoss Ltd</li>
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v2 or later</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
| <a href="#sec-constants">Constants</a>
| <a href="#sec-functions">Functions</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/caldav/RepeatRuleTimeZone.html">RepeatRuleTimeZone</a>
</td>
<td>
Wrap the DateTimeZone class to allow parsing some iCalendar TZID strangenesses
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/caldav/Rfc5545Duration.html">Rfc5545Duration</a>
</td>
<td>
Provide a useful way of dealing with RFC5545 duration strings of the form
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/caldav/RepeatRuleDateTime.html">RepeatRuleDateTime</a>
</td>
<td>
Wrap the DateTime class to make it friendlier to passing in random strings from iCalendar objects, and especially the random stuff used to identify timezones. We also add some utility methods and stuff too, in order to simplify some of the operations we need to do with dates.
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/caldav/RepeatRuleDateRange.html">RepeatRuleDateRange</a>
</td>
<td>
This class is used to hold a pair of dates defining a range. The range may be open-ended by including a null for one end or the other, or both.
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/caldav/RepeatRule.html">RepeatRule</a>
</td>
<td>
This class is an implementation of RRULE parsing and expansion, as per RFC5545. It should be reasonably complete, except that it does not handle changing the WKST - there may be a few errors in unusual rules also, but all of the common cases should be handled correctly.
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
| <a href="#sec-constants">Constants</a>
| <a href="#sec-functions">Functions</a>
</div>
<div class="info-box-body">
<a name="_vComponent_php"><!-- --></a>
<div class="evenrow">
<div>
<img src="../../media/images/Page.png" alt=" " />
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">"vComponent.php"</span>)
(line <span class="line-number">1099</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
</div>
</div>
</div>
<a name="sec-constants"></a>
<div class="info-box">
<div class="info-box-title">Constants</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
| <span class="disabled">Constants</span>
| <a href="#sec-functions">Functions</a>
</div>
<div class="info-box-body">
<a name="defineDEBUG_RRULE"><!-- --></a>
<div class="oddrow">
<div>
<img src="../../media/images/Constant.png" />
<span class="const-title">
<span class="const-name">DEBUG_RRULE</span> = false
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
</div>
</div>
</div>
<a name="sec-functions"></a>
<div class="info-box">
<div class="info-box-title">Functions</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
| <a href="#sec-constants">Constants</a>
| <span class="disabled">Functions</span>
</div>
<div class="info-box-body">
<a name="functionexpand_event_instances" id="functionexpand_event_instances"><!-- --></a>
<div class="evenrow">
<div>
<img src="../../media/images/Function.png" />
<span class="method-title">expand_event_instances</span> (line <span class="line-number">1180</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Expand the event instances for an iCalendar VEVENT (or VTODO)</p>
<p class="description"><p>Note: expansion here does not apply modifications to instances other than modifying start/end/due/duration.</p></p>
<ul class="tags">
<li><span class="field">return:</span> The original vComponent, with the instances of the internal components expanded.</li>
</ul>
<div class="method-signature">
<span class="method-result">vComponent</span>
<span class="method-name">
expand_event_instances
</span>
(<span class="var-type">object</span>&nbsp;<span class="var-name">$vResource</span>, [<span class="var-type">object</span>&nbsp;<span class="var-name">$range_start</span> = <span class="var-default">null</span>], [<span class="var-type">object</span>&nbsp;<span class="var-name">$range_end</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$return_floating_times</span> = <span class="var-default">false</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$vResource</span><span class="var-description">: A vComponent which is a VCALENDAR containing components needing expansion</span> </li>
<li>
<span class="var-type">object</span>
<span class="var-name">$range_start</span><span class="var-description">: A RepeatRuleDateTime which is the beginning of the range for events, default -6 weeks</span> </li>
<li>
<span class="var-type">object</span>
<span class="var-name">$range_end</span><span class="var-description">: A RepeatRuleDateTime which is the end of the range for events, default +6 weeks</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$return_floating_times</span> </li>
</ul>
</div>
<a name="functiongetComponentRange" id="functiongetComponentRange"><!-- --></a>
<div class="oddrow">
<div>
<img src="../../media/images/Function.png" />
<span class="method-title">getComponentRange</span> (line <span class="line-number">1394</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return a date range for this component.</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception (1) When DTSTART is not present but the RFC says MUST and (2) when we get an unsupported component</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../../awl/caldav/RepeatRuleDateRange.html">RepeatRuleDateRange</a></span>
<span class="method-name">
getComponentRange
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$comp</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">vComponent</span>
<span class="var-name">$comp</span> </li>
</ul>
</div>
<a name="functiongetVCalendarRange" id="functiongetVCalendarRange"><!-- --></a>
<div class="evenrow">
<div>
<img src="../../media/images/Function.png" />
<span class="method-title">getVCalendarRange</span> (line <span class="line-number">1449</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return a RepeatRuleDateRange from the earliest start to the latest end of the event.</p>
<ul class="tags">
<li><span class="field">return:</span> Representing the range of time covered by the event.</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../../awl/caldav/RepeatRuleDateRange.html">RepeatRuleDateRange</a></span>
<span class="method-name">
getVCalendarRange
</span>
(<span class="var-type">object</span>&nbsp;<span class="var-name">$vResource</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$vResource</span><span class="var-description">: A vComponent which is a VCALENDAR containing components needing expansion</span> </li>
</ul>
</div>
<a name="functionolson_from_vtimezone" id="functionolson_from_vtimezone"><!-- --></a>
<div class="oddrow">
<div>
<img src="../../media/images/Function.png" />
<span class="method-title">olson_from_vtimezone</span> (line <span class="line-number">19</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Try and extract something like &quot;Pacific/Auckland&quot; or &quot;America/Indiana/Indianapolis&quot; if possible, given the VTIMEZONE component that is passed in. This is much more complex than olson_from_tzstring since we start to examine the rules and work out what actual timezone this might be.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
olson_from_vtimezone
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$vtz</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">vComponent</span>
<span class="var-name">$vtz</span> </li>
</ul>
</div>
<a name="functionrdate_expand" id="functionrdate_expand"><!-- --></a>
<div class="evenrow">
<div>
<img src="../../media/images/Function.png" />
<span class="method-title">rdate_expand</span> (line <span class="line-number">1110</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Expand the event instances for an RDATE or EXDATE property</p>
<ul class="tags">
<li><span class="field">return:</span> An array keyed on the UTC dates, referring to the component</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
rdate_expand
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$dtstart</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$property</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$component</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$range_end</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$is_date</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$return_floating_times</span> = <span class="var-default">false</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$property</span><span class="var-description">: RDATE or EXDATE, depending...</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$component</span><span class="var-description">: A vComponent which is a VEVENT, VTODO or VJOURNAL</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$range_end</span><span class="var-description">: A date after which we care less about expansion</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$dtstart</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$is_date</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$return_floating_times</span> </li>
</ul>
</div>
<a name="functionrrule_expand" id="functionrrule_expand"><!-- --></a>
<div class="oddrow">
<div>
<img src="../../media/images/Function.png" />
<span class="method-title">rrule_expand</span> (line <span class="line-number">1138</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Expand the event instances for an RRULE property</p>
<ul class="tags">
<li><span class="field">return:</span> An array keyed on the UTC dates, referring to the component</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
rrule_expand
</span>
(<span class="var-type">object</span>&nbsp;<span class="var-name">$dtstart</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$property</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$component</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$range_end</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$is_date</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$return_floating_times</span> = <span class="var-default">false</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$dtstart</span><span class="var-description">: A RepeatRuleDateTime which is the master dtstart</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$property</span><span class="var-description">: RDATE or EXDATE, depending...</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$component</span><span class="var-description">: A vComponent which is a VEVENT, VTODO or VJOURNAL</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$range_end</span><span class="var-description">: A date after which we care less about expansion</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$is_date</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$return_floating_times</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Fri, 13 Jan 2012 23:44:56 +1300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
</p>
</div></body>
</html>