1: <?php
2: /**
3: * Implement the Horde_Data:: API for vNote data.
4: *
5: * Copyright 1999-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (LGPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
9: *
10: * @author Jan Schneider <jan@horde.org>
11: * @author Chuck Hagenbuch <chuck@horde.org>
12: * @category Horde
13: * @package Data
14: */
15: class Horde_Data_Vnote extends Horde_Data_Imc
16: {
17: /**
18: * Exports vcalendar data as a string. Unlike vEvent, vNote data
19: * is not enclosed in BEGIN|END:vCalendar.
20: *
21: * @param array $data An array containing Horde_Icalendar_Vnote
22: * objects.
23: * @param string $method The iTip method to use.
24: *
25: * @return string The iCalendar data.
26: */
27: public function exportData($data, $method = 'REQUEST')
28: {
29: $this->_iCal = new Horde_Icalendar();
30: $this->_iCal->setAttribute('METHOD', $method);
31:
32: $s = '';
33: foreach ($data as $event) {
34: $s .= $event->exportvCalendar();
35: }
36:
37: return $s;
38: }
39:
40: }
41: