Overview

Packages

  • Icalendar

Classes

  • Horde_Icalendar
  • Horde_Icalendar_Daylight
  • Horde_Icalendar_Exception
  • Horde_Icalendar_Standard
  • Horde_Icalendar_Translation
  • Horde_Icalendar_Valarm
  • Horde_Icalendar_Vcard
  • Horde_Icalendar_Vevent
  • Horde_Icalendar_Vfreebusy
  • Horde_Icalendar_Vjournal
  • Horde_Icalendar_Vnote
  • Horde_Icalendar_Vtimezone
  • Horde_Icalendar_Vtodo
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Class representing vNotes.
 4:  *
 5:  * Copyright 2003-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   Mike Cochrane <mike@graftonhall.co.nz>
11:  * @author   Karsten Fourmont <fourmont@gmx.de>
12:  * @category Horde
13:  * @license  http://www.horde.org/licenses/lgpl21 LGPL 2.1
14:  * @package  Icalendar
15:  */
16: class Horde_Icalendar_Vnote extends Horde_Icalendar
17: {
18:     /**
19:      * The component type of this class.
20:      *
21:      * @var string
22:      */
23:     public $type = 'vNote';
24: 
25:     /**
26:      * Constructor.
27:      */
28:     public function __construct($version = '1.1')
29:     {
30:         parent::__construct($version);
31:     }
32: 
33:     /**
34:      * Sets the version of this component.
35:      *
36:      * @see $version
37:      * @see $oldFormat
38:      *
39:      * @param string  A float-like version string.
40:      */
41:     public function setVersion($version)
42:     {
43:         $this->_oldFormat = $version < 1;
44:         $this->_version = $version;
45:     }
46: 
47:     /**
48:      * Unlike vevent and vtodo, a vnote is normally not enclosed in an
49:      * iCalendar container. (BEGIN..END)
50:      *
51:      * @return TODO
52:      */
53:     public function exportvCalendar()
54:     {
55:         $requiredAttributes['BODY'] = '';
56:         $requiredAttributes['VERSION'] = '1.1';
57: 
58:         foreach ($requiredAttributes as $name => $default_value) {
59:             try {
60:                 $this->getAttribute($name);
61:             } catch (Horde_Icalendar_Exception $e) {
62:                 $this->setAttribute($name, $default_value);
63:             }
64:         }
65: 
66:         return $this->_exportvData('VNOTE');
67:     }
68: 
69: }
70: 
API documentation generated by ApiGen