3 /*********************************************************************************/
4 /*********************************************************************************/
6 * class for calendar component VJOURNAL
8 * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
9 * @since 2.5.1 - 2008-10-12
11 class vjournal extends calendarComponent {
36 * constructor for calendar component VJOURNAL object
38 * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
39 * @since 2.8.2 - 2011-05-01
40 * @param array $config
43 function vjournal( $config = array()) {
44 $this->calendarComponent();
48 $this->categories = '';
53 $this->description = '';
57 $this->lastmodified = '';
58 $this->organizer = '';
60 $this->recurrenceid = '';
61 $this->relatedto = '';
62 $this->requeststatus = '';
70 if( defined( 'ICAL_LANG' ) && !isset( $config['language'] ))
71 $config['language'] = ICAL_LANG;
72 if( !isset( $config['allowEmpty'] )) $config['allowEmpty'] = TRUE;
73 if( !isset( $config['nl'] )) $config['nl'] = "\r\n";
74 if( !isset( $config['format'] )) $config['format'] = 'iCal';
75 if( !isset( $config['delimiter'] )) $config['delimiter'] = DIRECTORY_SEPARATOR;
76 $this->setConfig( $config );
80 * create formatted output for calendar component VJOURNAL object instance
82 * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
83 * @since 2.5.1 - 2008-10-12
84 * @param array $xcaldecl
87 function createComponent( &$xcaldecl ) {
88 $objectname = $this->_createFormat();
89 $component = $this->componentStart1.$objectname.$this->componentStart2.$this->nl;
90 $component .= $this->createUid();
91 $component .= $this->createDtstamp();
92 $component .= $this->createAttach();
93 $component .= $this->createAttendee();
94 $component .= $this->createCategories();
95 $component .= $this->createClass();
96 $component .= $this->createComment();
97 $component .= $this->createContact();
98 $component .= $this->createCreated();
99 $component .= $this->createDescription();
100 $component .= $this->createDtstart();
101 $component .= $this->createExdate();
102 $component .= $this->createExrule();
103 $component .= $this->createLastModified();
104 $component .= $this->createOrganizer();
105 $component .= $this->createRdate();
106 $component .= $this->createRequestStatus();
107 $component .= $this->createRecurrenceid();
108 $component .= $this->createRelatedTo();
109 $component .= $this->createRrule();
110 $component .= $this->createSequence();
111 $component .= $this->createStatus();
112 $component .= $this->createSummary();
113 $component .= $this->createUrl();
114 $component .= $this->createXprop();
115 $component .= $this->componentEnd1.$objectname.$this->componentEnd2;
116 if( is_array( $this->xcaldecl ) && ( 0 < count( $this->xcaldecl ))) {
117 foreach( $this->xcaldecl as $localxcaldecl )
118 $xcaldecl[] = $localxcaldecl;