More iCalendar -> Icalendar changes
authorChuck Hagenbuch <chuck@horde.org>
Mon, 25 Oct 2010 02:00:53 +0000 (22:00 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Mon, 25 Oct 2010 02:00:53 +0000 (22:00 -0400)
14 files changed:
framework/Itip/lib/Horde/Itip.php
framework/Itip/lib/Horde/Itip/Event.php
framework/Itip/lib/Horde/Itip/Response.php
framework/Itip/test/Horde/Itip/Integration/ItipTest.php
framework/Kolab_FreeBusy/lib/Horde/Kolab/FreeBusy/Cache.php
framework/SyncML/SyncML/Device/Sync4j.php
kronolith/lib/Event.php
kronolith/lib/tests/fromicalendar.phpt
mnemo/data.php
mnemo/lib/Api.php
mnemo/lib/Driver.php
nag/data.php
nag/lib/Api.php
nag/lib/Task.php

index 521f1f3..edb1372 100644 (file)
@@ -68,7 +68,7 @@ class Horde_Itip
      * @param string                   $product_id The ID that should be set as
      *                                             the iCalendar product id.
      *
-     * @return Horde_iCalendar The response object.
+     * @return Horde_Icalendar The response object.
      */
     public function getIcalendarResponse(
         Horde_Itip_Response_Type $type,
index 6c2e13f..f098dda 100644 (file)
@@ -32,7 +32,7 @@ interface Horde_Itip_Event
     /**
      * Returns the event as vEvent.
      *
-     * @return Horde_iCalendar_vevent The wrapped event.
+     * @return Horde_Icalendar_Vevent The wrapped event.
      */
     public function getVevent();
 
index 66074c0..396042a 100644 (file)
@@ -79,7 +79,7 @@ class Horde_Itip_Response
      * Return the response as an iCalendar vEvent object.
      *
      * @param Horde_Itip_Response_Type $type The response type.
-     * @param Horde_iCalendar|boolean  $vCal The parent container or false if not
+     * @param Horde_Icalendar|boolean  $vCal The parent container or false if not
      *                                       provided.
      *
      * @return Horde_Icalendar_Vevent The response object.
index b7a0ed8..23d3af6 100644 (file)
@@ -81,8 +81,8 @@ extends PHPUnit_Framework_TestCase
 
     public function testForCopiedDurationFromRequestToResponse()
     {
-        $vCal = new Horde_iCalendar();
-        $inv = Horde_iCalendar::newComponent('VEVENT', $vCal);
+        $vCal = new Horde_Icalendar();
+        $inv = Horde_Icalendar::newComponent('VEVENT', $vCal);
         $inv->setAttribute('METHOD', 'REQUEST');
         $inv->setAttribute('UID', '1');
         $inv->setAttribute('SUMMARY', 'Test Invitation');
index bf42cda..f08ca79 100644 (file)
@@ -279,7 +279,7 @@ class Horde_Kolab_FreeBusy_Cache {
      *                                        relevant access
      *                                        parameters.
      *
-     * @return Horde_iCalender The remote free/busy information.
+     * @return Horde_Icalender The remote free/busy information.
      */
     function &_fetchRemote($servers, $access)
     {
@@ -935,7 +935,7 @@ class Horde_Kolab_FreeBusy_Cache_File_pvcal extends Horde_Kolab_FreeBusy_Cache_F
     /**
      * Store partial free/busy infomation in the cache file.
      *
-     * @param Horde_iCalendar $pvcal A reference to the data object.
+     * @param Horde_Icalendar $pvcal A reference to the data object.
      *
      * @return boolean|PEAR_Error True if successful.
      */
@@ -949,7 +949,7 @@ class Horde_Kolab_FreeBusy_Cache_File_pvcal extends Horde_Kolab_FreeBusy_Cache_F
      *
      * @param boolean $extended Should the extended information be retrieved?
      *
-     * @return Horde_iCalendar|PEAR_Error The data retrieved from the cache file.
+     * @return Horde_Icalendar|PEAR_Error The data retrieved from the cache file.
      */
     function &loadPVcal($extended)
     {
@@ -1030,7 +1030,7 @@ class Horde_Kolab_FreeBusy_Cache_File_vcal extends Horde_Kolab_FreeBusy_Cache_Fi
     /**
      * Store free/busy infomation in the cache file.
      *
-     * @param Horde_iCalendar $vcal   A reference to the data object.
+     * @param Horde_Icalendar $vcal   A reference to the data object.
      * @param array           $mtimes A list of modification times for the
      *                                partial free/busy cache times.
      *
@@ -1046,7 +1046,7 @@ class Horde_Kolab_FreeBusy_Cache_File_vcal extends Horde_Kolab_FreeBusy_Cache_Fi
     /**
      * Load the free/busy information from the cache.
      *
-     * @return Horde_iCalendar|PEAR_Error The retrieved free/busy information.
+     * @return Horde_Icalendar|PEAR_Error The retrieved free/busy information.
      */
     function &loadVcal()
     {
index b55b478..ecc6731 100644 (file)
@@ -6,7 +6,7 @@
 /** Horde_Date */
 require_once 'Horde/Date.php';
 
-/** Horde_iCalendar */
+/** Horde_Icalendar */
 require_once 'Horde/Icalendar.php';
 
 /**
index eb9bc04..e9cbb9d 100644 (file)
@@ -513,7 +513,7 @@ abstract class Kronolith_Event
     /**
      * Exports this event in iCalendar format.
      *
-     * @param Horde_Icalendar $calendar  A Horde_iCalendar object that acts as
+     * @param Horde_Icalendar $calendar  A Horde_Icalendar object that acts as
      *                                   a container.
      *
      * @return array  An array of Horde_Icalendar_Vevent objects for this event.
index 9d3b242..06344b1 100644 (file)
@@ -21,18 +21,18 @@ require 'Date/Calc.php';
 require 'Horde/Date.php';
 require 'Horde/Date/Recurrence.php';
 require 'Horde/Util.php';
-require 'Horde/iCalendar.php';
+require 'Horde/Icalendar.php';
 
-$iCal = new Horde_iCalendar();
+$iCal = new Horde_Icalendar();
 $iCal->parsevCalendar(file_get_contents(dirname(__FILE__) . '/fromicalendar.ics'));
 $components = $iCal->getComponents();
-$iCal2 = new Horde_iCalendar();
+$iCal2 = new Horde_Icalendar();
 
 define('KRONOLITH_BASE', dirname(__FILE__) . '/../..');
 require KRONOLITH_BASE . '/lib/Kronolith.php';
 require KRONOLITH_BASE . '/lib/Driver.php';
 foreach ($components as $content) {
-    if (is_a($content, 'Horde_iCalendar_vevent')) {
+    if (is_a($content, 'Horde_Icalendar_Vevent')) {
         $event = new Kronolith_Event(new Driver);
         $event->fromiCalendar($content);
         echo $event->start->rfc3339DateTime() . "\n";
index f3bbc5c..50c9de9 100644 (file)
@@ -130,7 +130,7 @@ if (is_array($next_step)) {
         }
 
         /* Check if we need to convert from iCalendar data into an array. */
-        if (is_a($row, 'Horde_iCalendar_vnote')) {
+        if (is_a($row, 'Horde_Icalendar_vnote')) {
             $row = $storage->fromiCalendar($row);
         }
 
index 2fd70ea..b0583b4 100644 (file)
@@ -222,9 +222,8 @@ class Mnemo_Api extends Horde_Registry_Api
             break;
 
         case 'text/x-vnote':
-            if (!is_a($content, 'Horde_iCalendar_vnote')) {
-                require_once 'Horde/iCalendar.php';
-                $iCal = new Horde_iCalendar();
+            if (!is_a($content, 'Horde_Icalendar_Vnote')) {
+                $iCal = new Horde_Icalendar();
                 if (!$iCal->parsevCalendar($content)) {
                     return PEAR::raiseError(_("There was an error importing the iCalendar data."));
                 }
@@ -241,7 +240,7 @@ class Mnemo_Api extends Horde_Registry_Api
                 default:
                     $ids = array();
                     foreach ($components as $content) {
-                        if (is_a($content, 'Horde_iCalendar_vnote')) {
+                        if (is_a($content, 'Horde_Icalendar_Vnote')) {
                             $note = $storage->fromiCalendar($content);
                             $noteId = $storage->add($note['desc'],
                                                     $note['body'],
@@ -316,7 +315,7 @@ class Mnemo_Api extends Horde_Registry_Api
             require_once 'Horde/iCalendar.php';
 
             // Create the new iCalendar container.
-            $iCal = new Horde_iCalendar('1.1');
+            $iCal = new Horde_Icalendar('1.1');
             $iCal->setAttribute('VERSION', '1.1');
             $iCal->setAttribute('PRODID', '-//The Horde Project//Mnemo ' . Mnemo::VERSION . '//EN');
             $iCal->setAttribute('METHOD', 'PUBLISH');
@@ -397,9 +396,8 @@ class Mnemo_Api extends Horde_Registry_Api
             return $storage->modify($memo['memo_id'], $storage->getMemoDescription($content), $content, null);
 
         case 'text/x-vnote':
-            if (!is_a($content, 'Horde_iCalendar_vnote')) {
-                require_once 'Horde/iCalendar.php';
-                $iCal = new Horde_iCalendar();
+            if (!is_a($content, 'Horde_Icalendar_Vnote')) {
+                $iCal = new Horde_Icalendar();
                 if (!$iCal->parsevCalendar($content)) {
                     return PEAR::raiseError(_("There was an error importing the iCalendar data."));
                 }
index 0d92ee0..20a7c2c 100644 (file)
@@ -252,15 +252,15 @@ class Mnemo_Driver {
      * Export this memo in iCalendar format.
      *
      * @param array  memo      the memo (hash array) to export
-     * @param object vcal      a Horde_iCalendar object that acts as container.
+     * @param object vcal      a Horde_Icalendar object that acts as container.
      *
-     * @return object  Horde_iCalendar_vnote object for this event.
+     * @return object  Horde_Icalendar_Vnote object for this event.
      */
     function toiCalendar($memo, &$calendar)
     {
         global $prefs;
 
-        $vnote = &Horde_iCalendar::newComponent('vnote', $calendar);
+        $vnote = Horde_Icalendar::newComponent('vnote', $calendar);
 
         $vnote->setAttribute('UID', $memo['uid']);
         $vnote->setAttribute('BODY', $memo['body']);
@@ -298,9 +298,9 @@ class Mnemo_Driver {
     }
 
     /**
-     * Create a memo (hash array) from a Horde_iCalendar_vnote object.
+     * Create a memo (hash array) from a Horde_Icalendar_Vnote object.
      *
-     * @param Horde_iCalendar_vnote $vnote  The iCalendar data to update from.
+     * @param Horde_Icalendar_Vnote $vnote  The iCalendar data to update from.
      *
      * @return array  Memo (hash array) created from the vNote.
      */
index 72d9ff5..c0da90e 100644 (file)
@@ -117,7 +117,7 @@ case 'export':
             exit;
 
         case Horde_Data::EXPORT_ICALENDAR:
-            $iCal = new Horde_iCalendar();
+            $iCal = new Horde_Icalendar();
             $iCal->setAttribute(
                 'PRODID',
                 '-//The Horde Project//Nag ' . $registry->getVersion() . '//EN');
@@ -176,7 +176,7 @@ if (is_array($next_step)) {
         }
 
         if (!is_array($row)) {
-            if (!is_a($row, 'Horde_iCalendar_vtodo')) {
+            if (!is_a($row, 'Horde_Icalendar_Vtodo')) {
                 continue;
             }
             $task = new Nag_Task();
index 09cff9f..271aa27 100644 (file)
@@ -784,7 +784,7 @@ class Nag_Api extends Horde_Registry_Api
 
             $ids = array();
             foreach ($components as $content) {
-                if ($content instanceof Horde_iCalendar_vtodo) {
+                if ($content instanceof Horde_Icalendar_Vtodo) {
                     $task = new Nag_Task();
                     $task->fromiCalendar($content);
                     if (isset($task->uid) &&
index 5fca4ea..8f30de6 100644 (file)
@@ -783,14 +783,14 @@ class Nag_Task {
     /**
      * Exports this task in iCalendar format.
      *
-     * @param Horde_iCalendar $calendar  A Horde_iCalendar object that acts as
+     * @param Horde_Icalendar $calendar  A Horde_Icalendar object that acts as
      *                                   the container.
      *
-     * @return Horde_iCalendar_vtodo  A vtodo component of this task.
+     * @return Horde_Icalendar_Vtodo  A vtodo component of this task.
      */
     function toiCalendar($calendar)
     {
-        $vTodo = Horde_iCalendar::newComponent('vtodo', $calendar);
+        $vTodo = Horde_Icalendar::newComponent('vtodo', $calendar);
         $v1 = $calendar->getAttribute('VERSION') == '1.0';
 
         $vTodo->setAttribute('UID', $this->uid);
@@ -830,7 +830,7 @@ class Nag_Task {
                 if ($v1) {
                     $vTodo->setAttribute('AALARM', $this->due - $this->alarm * 60);
                 } else {
-                    $vAlarm = Horde_iCalendar::newComponent('valarm', $vTodo);
+                    $vAlarm = Horde_Icalendar::newComponent('valarm', $vTodo);
                     $vAlarm->setAttribute('ACTION', 'DISPLAY');
                     $vAlarm->setAttribute('TRIGGER;VALUE=DURATION', '-PT' . $this->alarm . 'M');
                     $vTodo->addComponent($vAlarm);
@@ -935,9 +935,9 @@ class Nag_Task {
     }
 
     /**
-     * Creates a task from a Horde_iCalendar_vtodo object.
+     * Creates a task from a Horde_Icalendar_Vtodo object.
      *
-     * @param Horde_iCalendar_vtodo $vTodo  The iCalendar data to update from.
+     * @param Horde_Icalendar_Vtodo $vTodo  The iCalendar data to update from.
      */
     function fromiCalendar($vTodo)
     {