PHP 클래스 Horde_Date_Recurrence, horde

All methods expecting dates as parameters accept all values that the Horde_Date constructor accepts, i.e. a timestamp, another Horde_Date object, an ISO time string or a hash.
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$completions array All the dates this recurrence has been marked as completed.
$exceptions array All the exceptions from recurrence for this event.
$recurCount integer The number of recurrences.
$recurData integer Any additional recurrence data.
$recurEnd Horde_Date The end date of the recurrence interval.
$recurInterval integer The length of time between recurrences. The time unit depends on the recurrence type.
$recurType integer The type of recurrence this event follows. RECUR_* constant.
$start Horde_Date The start time of the event.

공개 메소드들

메소드 설명
__construct ( Horde_Date $start ) Constructor.
addCompletion ( integer $year, integer $month, integer $mday ) Adds a completion to a recurring event.
addException ( integer $year, integer $month, integer $mday ) Adds an exception to a recurring event.
deleteCompletion ( integer $year, integer $month, integer $mday ) Deletes a completion from a recurring event.
deleteException ( integer $year, integer $month, integer $mday ) Deletes an exception from a recurring event.
fromKolab ( array $hash ) : boolean Parses the recurrence data from a Kolab hash.
fromRRule10 ( string $rrule ) Parses a vCalendar 1.0 recurrence rule.
fromRRule20 ( string $rrule ) Parses an iCalendar 2.0 recurrence rule.
getCompletions ( ) : array Retrieves all the completions for this event.
getExceptions ( ) : array Retrieves all the exceptions for this event.
getRecurCount ( ) : integer Retrieves the number of recurrences of this event.
getRecurEnd ( ) : Horde_Date Retrieves the end date of the recurrence interval.
getRecurInterval ( ) : integer Retrieves the length of time between recurrences of this event.
getRecurName ( ) : string Returns a description of this event's recurring type.
getRecurOnDays ( ) : integer Returns the days this event recurs on.
getRecurStart ( ) : Horde_Date Retrieves the start date of the recurrence interval.
getRecurType ( ) : integer Returns recurrence type of this event.
hasActiveRecurrence ( ) : boolean Returns whether this event has any date that matches the recurrence rules and is not an exception.
hasCompletion ( integer $year, integer $month, integer $mday ) : boolean Checks if a completion exists for a given reccurence of an event.
hasException ( integer $year, integer $month, integer $mday ) : boolean Checks if an exception exists for a given reccurence of an event.
hasRecurCount ( ) : boolean Returns whether this event has a recurrence with a fixed count.
hasRecurEnd ( ) : boolean Returns whether this event has a recurrence end.
hasRecurType ( integer $recurrence ) : boolean Returns whether this event has a specific recurrence type.
isEqual ( Horde_Date_Recurrence $recurrence ) : boolean Return whether or not this object is equal to another recurrence object.
nextActiveRecurrence ( Horde_Date $afterDate ) : Horde_Date | boolean Returns the next active recurrence.
nextRecurrence ( Horde_Date | string $after ) : Horde_Date | boolean Finds the next recurrence of this event that's after $afterDate.
recurOnDay ( integer $dayMask ) : boolean Checks if this event recurs on a given day of the week.
reset ( ) Resets the class properties.
setRecurCount ( integer $count ) Sets the number of recurrences of this event.
setRecurEnd ( Horde_Date $end ) Sets the end date of the recurrence interval.
setRecurInterval ( integer $interval ) Sets the length of time between recurrences of this event.
setRecurOnDay ( integer $dayMask ) Specifies the days this event recurs on.
setRecurStart ( Horde_Date $start ) Sets the start date of the recurrence interval.
setRecurType ( integer $recurrence ) Sets a recurrence type for this event.
toJson ( ) : object Returns a simple object suitable for json transport representing this object.
toKolab ( ) : array Export this object into a Kolab hash.
toRRule10 ( Horde_Icalendar $calendar ) : string Creates a vCalendar 1.0 recurrence rule.
toRRule20 ( Horde_Icalendar $calendar ) : string Creates an iCalendar 2.0 recurrence rule.
toString ( $date_format ) : string Output a human readable description of the recurrence rule.

보호된 메소드들

메소드 설명
_formatExceptionDate ( string $date, string $format ) : string Returns a correcty formatted exception date for recurring events.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Horde_Date $start )
$start Horde_Date Start of the recurring event.

_formatExceptionDate() 보호된 메소드

Returns a correcty formatted exception date for recurring events.
부터: 2.1.0
protected _formatExceptionDate ( string $date, string $format ) : string
$date string Exception in the format Ymd.
$format string The format to display in.
리턴 string The formatted date and delete link.

addCompletion() 공개 메소드

Adds a completion to a recurring event.
public addCompletion ( integer $year, integer $month, integer $mday )
$year integer The year of the exception.
$month integer The month of the exception.
$mday integer The day of the month of the completion.

addException() 공개 메소드

Adds an exception to a recurring event.
public addException ( integer $year, integer $month, integer $mday )
$year integer The year of the exception.
$month integer The month of the exception.
$mday integer The day of the month of the exception.

deleteCompletion() 공개 메소드

Deletes a completion from a recurring event.
public deleteCompletion ( integer $year, integer $month, integer $mday )
$year integer The year of the exception.
$month integer The month of the exception.
$mday integer The day of the month of the completion.

deleteException() 공개 메소드

Deletes an exception from a recurring event.
public deleteException ( integer $year, integer $month, integer $mday )
$year integer The year of the exception.
$month integer The month of the exception.
$mday integer The day of the month of the exception.

fromKolab() 공개 메소드

Parses the recurrence data from a Kolab hash.
public fromKolab ( array $hash ) : boolean
$hash array The hash to convert.
리턴 boolean True if the hash seemed valid, false otherwise.

fromRRule10() 공개 메소드

Parses a vCalendar 1.0 recurrence rule.
public fromRRule10 ( string $rrule )
$rrule string A vCalendar 1.0 conform RRULE value.

fromRRule20() 공개 메소드

Parses an iCalendar 2.0 recurrence rule.
public fromRRule20 ( string $rrule )
$rrule string An iCalendar 2.0 conform RRULE value.

getCompletions() 공개 메소드

Retrieves all the completions for this event.
public getCompletions ( ) : array
리턴 array Array containing the dates of all the completions in YYYYMMDD form.

getExceptions() 공개 메소드

Retrieves all the exceptions for this event.
public getExceptions ( ) : array
리턴 array Array containing the dates of all the exceptions in YYYYMMDD form.

getRecurCount() 공개 메소드

Retrieves the number of recurrences of this event.
public getRecurCount ( ) : integer
리턴 integer The number recurrences.

getRecurEnd() 공개 메소드

Retrieves the end date of the recurrence interval.
public getRecurEnd ( ) : Horde_Date
리턴 Horde_Date The recurrence end.

getRecurInterval() 공개 메소드

Retrieves the length of time between recurrences of this event.
public getRecurInterval ( ) : integer
리턴 integer The number of seconds between recurrences.

getRecurName() 공개 메소드

Returns a description of this event's recurring type.
public getRecurName ( ) : string
리턴 string Human readable recurring type.

getRecurOnDays() 공개 메소드

Returns the days this event recurs on.
public getRecurOnDays ( ) : integer
리턴 integer A mask consisting of Horde_Date::MASK_* constants specifying the day(s) this event recurs on.

getRecurStart() 공개 메소드

Retrieves the start date of the recurrence interval.
public getRecurStart ( ) : Horde_Date
리턴 Horde_Date The recurrence start.

getRecurType() 공개 메소드

Returns recurrence type of this event.
public getRecurType ( ) : integer
리턴 integer A RECUR_* constant.

hasActiveRecurrence() 공개 메소드

Returns whether this event has any date that matches the recurrence rules and is not an exception.
public hasActiveRecurrence ( ) : boolean
리턴 boolean True if an active recurrence exists.

hasCompletion() 공개 메소드

Checks if a completion exists for a given reccurence of an event.
public hasCompletion ( integer $year, integer $month, integer $mday ) : boolean
$year integer The year of the recurrance.
$month integer The month of the recurrance.
$mday integer The day of the month of the recurrance.
리턴 boolean True if a completion exists for the given date.

hasException() 공개 메소드

Checks if an exception exists for a given reccurence of an event.
public hasException ( integer $year, integer $month, integer $mday ) : boolean
$year integer The year of the reucrance.
$month integer The month of the reucrance.
$mday integer The day of the month of the reucrance.
리턴 boolean True if an exception exists for the given date.

hasRecurCount() 공개 메소드

Returns whether this event has a recurrence with a fixed count.
public hasRecurCount ( ) : boolean
리턴 boolean True if this recurrence has a fixed count.

hasRecurEnd() 공개 메소드

Returns whether this event has a recurrence end.
public hasRecurEnd ( ) : boolean
리턴 boolean True if this recurrence ends.

hasRecurType() 공개 메소드

Returns whether this event has a specific recurrence type.
public hasRecurType ( integer $recurrence ) : boolean
$recurrence integer RECUR_* constant of the recurrence type to check for.
리턴 boolean True if the event has the specified recurrence type.

isEqual() 공개 메소드

The objects are considered equal if the recurrence rules are the same. This does not take any exceptions into account.
부터: 2.2.0
public isEqual ( Horde_Date_Recurrence $recurrence ) : boolean
$recurrence Horde_Date_Recurrence The recurrence object to check equality to.
리턴 boolean True if the recurrence rules are the same.

nextActiveRecurrence() 공개 메소드

Returns the next active recurrence.
public nextActiveRecurrence ( Horde_Date $afterDate ) : Horde_Date | boolean
$afterDate Horde_Date Return events after this date.
리턴 Horde_Date | boolean The date of the next active recurrence or false if the event has no active recurrence after $afterDate.

nextRecurrence() 공개 메소드

Finds the next recurrence of this event that's after $afterDate.
public nextRecurrence ( Horde_Date | string $after ) : Horde_Date | boolean
$after Horde_Date | string Return events after this date.
리턴 Horde_Date | boolean The date of the next recurrence or false if the event does not recur after $afterDate.

recurOnDay() 공개 메소드

Checks if this event recurs on a given day of the week.
public recurOnDay ( integer $dayMask ) : boolean
$dayMask integer A mask consisting of Horde_Date::MASK_* constants specifying the day(s) to check.
리턴 boolean True if this event recurs on the given day(s).

reset() 공개 메소드

Resets the class properties.
public reset ( )

setRecurCount() 공개 메소드

Sets the number of recurrences of this event.
public setRecurCount ( integer $count )
$count integer The number of recurrences.

setRecurEnd() 공개 메소드

Sets the end date of the recurrence interval.
public setRecurEnd ( Horde_Date $end )
$end Horde_Date The recurrence end.

setRecurInterval() 공개 메소드

Sets the length of time between recurrences of this event.
public setRecurInterval ( integer $interval )
$interval integer The time between recurrences.

setRecurOnDay() 공개 메소드

Specifies the days this event recurs on.
public setRecurOnDay ( integer $dayMask )
$dayMask integer A mask consisting of Horde_Date::MASK_* constants specifying the day(s) to recur on.

setRecurStart() 공개 메소드

Sets the start date of the recurrence interval.
public setRecurStart ( Horde_Date $start )
$start Horde_Date The recurrence start.

setRecurType() 공개 메소드

Sets a recurrence type for this event.
public setRecurType ( integer $recurrence )
$recurrence integer A RECUR_* constant.

toJson() 공개 메소드

Possible properties are: - t: type - i: interval - e: end date - c: count - d: data - co: completions - ex: exceptions
public toJson ( ) : object
리턴 object A simple object.

toKolab() 공개 메소드

Export this object into a Kolab hash.
public toKolab ( ) : array
리턴 array The recurrence hash.

toRRule10() 공개 메소드

Creates a vCalendar 1.0 recurrence rule.
public toRRule10 ( Horde_Icalendar $calendar ) : string
$calendar Horde_Icalendar A Horde_Icalendar object instance.
리턴 string A vCalendar 1.0 conform RRULE value.

toRRule20() 공개 메소드

Creates an iCalendar 2.0 recurrence rule.
public toRRule20 ( Horde_Icalendar $calendar ) : string
$calendar Horde_Icalendar A Horde_Icalendar object instance.
리턴 string An iCalendar 2.0 conform RRULE value.

toString() 공개 메소드

Output a human readable description of the recurrence rule.
부터: 2.1.0
public toString ( $date_format ) : string
리턴 string

프로퍼티 상세

$completions 공개적으로 프로퍼티

All the dates this recurrence has been marked as completed.
public array $completions
리턴 array

$exceptions 공개적으로 프로퍼티

All the exceptions from recurrence for this event.
public array $exceptions
리턴 array

$recurCount 공개적으로 프로퍼티

The number of recurrences.
public int $recurCount
리턴 integer

$recurData 공개적으로 프로퍼티

Any additional recurrence data.
public int $recurData
리턴 integer

$recurEnd 공개적으로 프로퍼티

The end date of the recurrence interval.
public Horde_Date $recurEnd
리턴 Horde_Date

$recurInterval 공개적으로 프로퍼티

The length of time between recurrences. The time unit depends on the recurrence type.
public int $recurInterval
리턴 integer

$recurType 공개적으로 프로퍼티

The type of recurrence this event follows. RECUR_* constant.
public int $recurType
리턴 integer

$start 공개적으로 프로퍼티

The start time of the event.
public Horde_Date $start
리턴 Horde_Date