Inheritance diagram for vircal_ardb:
This class is probably just a temporary solution to store some fixed prefabbed virtual_calendar definition in a repository. It uses the technique of singleton classes: for each specific virtual calendar a specific subclass of vircal_ardb is defined. When used it should a single instance of it can be initialized and used to build calendars from.
To learn about the definitions of virtual calendar defs see Array Encoding of the Virtual Calendar Definitions
/uk/holidays.ics
from a typical available vircal_ardb subclass named world_vircal_ardb
we could use use the following code: // search the world_vircal_db class to see if it provides a virtual calendar // called /uk/holidays.ics $wvcdb =& new world_vircal_ardb(); if(! $ukholidays_vc_ar = $wvcdb->calendars['/uk/holidays.ics']) { echo 'couldnot find virtual calendar /uk/holidays.ics'; exit(); } // create a virtual calendar and restore from the found array $ukholidays_vircal =& new virtual_calendar; $ukholidays_vircal->fromArray($ukholiday_vc_ar);
Public Member Functions | |
virtual | rebuild_calendars () |
Initialize the storage in $calendars This method should be overwritten in subclasses! . | |
vircal_ardb () | |
Constructor A initialisation of all the $calendars member is done by calling the method rebuild_calendars(). | |
Public Attributes | |
array | $calendars |
The hash that holds all the defined calendar storage arrays. |
|
The hash that holds all the defined calendar storage arrays. This hash stores all the defined calendars as calpathname => array pairs. At initialization time it is filled using the method rebuild_calendars() At any time later it can be rebuild to its initial definitions again using the same method. |