PHP Class Horde_Timezone_Zone, horde

Author: Jan Schneider ([email protected])
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_info array Zone lines of this zone object.
$_name string The timezone ID.
$_tz A Horde_Timezone object.

Public Methods

Method Description
__construct ( string $name, Horde_Timezone $tz ) Constructor.
add ( array $info ) Adds a Zone line to this zone object.
setTzid ( string $name ) Sets the timezone ID.
toVtimezone ( Horde_Date $from = null, Horde_Date $to = null ) : Horde_Icalendar_Vtimezone Exports this zone to a VTIMEZONE component.

Protected Methods

Method Description
_getDate ( integer $line ) : Horde_Date Calculates a date from the date columns of a Zone line.
_getOffset ( integer $line ) : array Calculates an offset from the offset column of a Zone line.

Method Details

__construct() public method

Constructor.
public __construct ( string $name, Horde_Timezone $tz )
$name string A timezone ID.
$tz Horde_Timezone A Horde_Timezone object. Used to retrieve rules for this timezone.

_getDate() protected method

Calculates a date from the date columns of a Zone line.
protected _getDate ( integer $line ) : Horde_Date
$line integer A line number.
return Horde_Date The date of this line.

_getOffset() protected method

Calculates an offset from the offset column of a Zone line.
protected _getOffset ( integer $line ) : array
$line integer A line number.
return array A hash describing the offset.

add() public method

Adds a Zone line to this zone object.
public add ( array $info )
$info array A parsed Zone line or continuation line.

setTzid() public method

There are aliases for timezone IDs, it might be necessary to use one of those.
public setTzid ( string $name )
$name string A timezone ID.

toVtimezone() public method

Exports this zone to a VTIMEZONE component.
public toVtimezone ( Horde_Date $from = null, Horde_Date $to = null ) : Horde_Icalendar_Vtimezone
$from Horde_Date The earliest date that we need timezone definitions for.
$to Horde_Date The latest date.
return Horde_Icalendar_Vtimezone A VTIMEZONE component representing this timezone.

Property Details

$_info protected_oe property

Zone lines of this zone object.
protected array $_info
return array

$_name protected_oe property

The timezone ID.
protected string $_name
return string

$_tz protected_oe property

A Horde_Timezone object.
protected $_tz