fix image text
[pear] / iCal / vjournal.php
1 <?php
2
3 /*********************************************************************************/
4 /*********************************************************************************/
5 /**
6  * class for calendar component VJOURNAL
7  *
8  * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
9  * @since 2.5.1 - 2008-10-12
10  */
11 class vjournal extends calendarComponent {
12   var $attach;
13   var $attendee;
14   var $categories;
15   var $comment;
16   var $contact;
17   var $class;
18   var $created;
19   var $description;
20   var $dtstart;
21   var $exdate;
22   var $exrule;
23   var $lastmodified;
24   var $organizer;
25   var $rdate;
26   var $recurrenceid;
27   var $relatedto;
28   var $requeststatus;
29   var $rrule;
30   var $sequence;
31   var $status;
32   var $summary;
33   var $url;
34   var $xprop;
35 /**
36  * constructor for calendar component VJOURNAL object
37  *
38  * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
39  * @since 2.8.2 - 2011-05-01
40  * @param array $config
41  * @return void
42  */
43   function vjournal( $config = array()) {
44     $this->calendarComponent();
45
46     $this->attach          = '';
47     $this->attendee        = '';
48     $this->categories      = '';
49     $this->class           = '';
50     $this->comment         = '';
51     $this->contact         = '';
52     $this->created         = '';
53     $this->description     = '';
54     $this->dtstart         = '';
55     $this->exdate          = '';
56     $this->exrule          = '';
57     $this->lastmodified    = '';
58     $this->organizer       = '';
59     $this->rdate           = '';
60     $this->recurrenceid    = '';
61     $this->relatedto       = '';
62     $this->requeststatus   = '';
63     $this->rrule           = '';
64     $this->sequence        = '';
65     $this->status          = '';
66     $this->summary         = '';
67     $this->url             = '';
68     $this->xprop           = '';
69
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 );
77
78   }
79 /**
80  * create formatted output for calendar component VJOURNAL object instance
81  *
82  * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
83  * @since 2.5.1 - 2008-10-12
84  * @param array $xcaldecl
85  * @return string
86  */
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;
119     }
120     return $component;
121   }
122 }