* @since 2.5.1 - 2008-10-12 */ class vfreebusy extends calendarComponent { var $attendee; var $comment; var $contact; var $dtend; var $dtstart; var $duration; var $freebusy; var $organizer; var $requeststatus; var $url; var $xprop; // component subcomponents container var $components; /** * constructor for calendar component VFREEBUSY object * * @author Kjell-Inge Gustafsson, kigkonsult * @since 2.8.2 - 2011-05-01 * @param array $config * @return void */ function vfreebusy( $config = array()) { $this->calendarComponent(); $this->attendee = ''; $this->comment = ''; $this->contact = ''; $this->dtend = ''; $this->dtstart = ''; $this->duration = ''; $this->freebusy = ''; $this->organizer = ''; $this->requeststatus = ''; $this->url = ''; $this->xprop = ''; if( defined( 'ICAL_LANG' ) && !isset( $config['language'] )) $config['language'] = ICAL_LANG; if( !isset( $config['allowEmpty'] )) $config['allowEmpty'] = TRUE; if( !isset( $config['nl'] )) $config['nl'] = "\r\n"; if( !isset( $config['format'] )) $config['format'] = 'iCal'; if( !isset( $config['delimiter'] )) $config['delimiter'] = DIRECTORY_SEPARATOR; $this->setConfig( $config ); } /** * create formatted output for calendar component VFREEBUSY object instance * * @author Kjell-Inge Gustafsson, kigkonsult * @since 2.3.1 - 2007-11-19 * @param array $xcaldecl * @return string */ function createComponent( &$xcaldecl ) { $objectname = $this->_createFormat(); $component = $this->componentStart1.$objectname.$this->componentStart2.$this->nl; $component .= $this->createUid(); $component .= $this->createDtstamp(); $component .= $this->createAttendee(); $component .= $this->createComment(); $component .= $this->createContact(); $component .= $this->createDtstart(); $component .= $this->createDtend(); $component .= $this->createDuration(); $component .= $this->createFreebusy(); $component .= $this->createOrganizer(); $component .= $this->createRequestStatus(); $component .= $this->createUrl(); $component .= $this->createXprop(); $component .= $this->componentEnd1.$objectname.$this->componentEnd2; if( is_array( $this->xcaldecl ) && ( 0 < count( $this->xcaldecl ))) { foreach( $this->xcaldecl as $localxcaldecl ) $xcaldecl[] = $localxcaldecl; } return $component; } }