fix camelcase of method names
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 3 Jun 2010 15:52:43 +0000 (11:52 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 3 Jun 2010 17:29:03 +0000 (13:29 -0400)
framework/ActiveSync/lib/Horde/ActiveSync/Connector/Importer.php
framework/ActiveSync/lib/Horde/ActiveSync/Driver/Base.php
framework/ActiveSync/lib/Horde/ActiveSync/Request/FolderCreate.php
framework/ActiveSync/lib/Horde/ActiveSync/Request/GetHierarchy.php
framework/ActiveSync/lib/Horde/ActiveSync/Request/MeetingResponse.php
framework/ActiveSync/lib/Horde/ActiveSync/Request/MoveItems.php
framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php
framework/ActiveSync/lib/Horde/ActiveSync/State/File.php

index 761ee80..5a42a73 100644 (file)
@@ -196,7 +196,7 @@ class Horde_ActiveSync_Connector_Importer
         $this->_state->updateState('flags', $change, Horde_ActiveSync::CHANGE_ORIGIN_NA);
 
         /* Tell backend */
-        $this->_backend->SetReadFlag($this->_folderId, $id, $flags);
+        $this->_backend->setReadFlag($this->_folderId, $id, $flags);
 
         return true;
     }
@@ -270,7 +270,7 @@ class Horde_ActiveSync_Connector_Importer
         $change['id'] = $id;
 
         $this->_state->updateState('delete', $change, Horde_ActiveSync::CHANGE_ORIGIN_NA);
-        $this->_backend->DeleteFolder($parent, $id);
+        $this->_backend->deleteFolder($parent, $id);
 
         return true;
     }
index 9d40865..46fff28 100644 (file)
@@ -325,7 +325,7 @@ abstract class Horde_ActiveSync_Driver_Base
      *
      * @return Horde_ActiveSync_DiffState_ImportHierarchy
      */
-    public function GetHierarchyImporter()
+    public function getHierarchyImporter()
     {
         $importer = new Horde_ActiveSync_DiffState_ImportHierarchy($this);
         $importer->setLogger($this->_logger);
@@ -340,7 +340,7 @@ abstract class Horde_ActiveSync_Driver_Base
      *
      * @return Horde_ActiveSync_DiffState_ImportContents
      */
-    public function GetContentsImporter($folderId)
+    public function getContentsImporter($folderId)
     {
         $importer = new Horde_ActiveSync_DiffState_ImportContents($this, $folderId);
         $importer->setLogger($this->_logger);
@@ -391,7 +391,7 @@ abstract class Horde_ActiveSync_Driver_Base
      *
      * @return array
      */
-    public function GetHierarchy()
+    public function getHierarchy()
     {
         $folders = array();
 
@@ -412,7 +412,7 @@ abstract class Horde_ActiveSync_Driver_Base
      *
      * @return Horde_ActiveSync_Message_Base The message data
      */
-    public function Fetch($folderid, $id, $mimesupport = 0)
+    public function fetch($folderid, $id, $mimesupport = 0)
     {
         // Forces entire message (up to 1Mb)
         return $this->getMessage($folderid, $id, 1024 * 1024, $mimesupport);
@@ -423,7 +423,7 @@ abstract class Horde_ActiveSync_Driver_Base
      * @param $attname
      * @return unknown_type
      */
-    public function GetAttachmentData($attname)
+    public function getAttachmentData($attname)
     {
         return false;
     }
@@ -457,7 +457,7 @@ abstract class Horde_ActiveSync_Driver_Base
      * @return boolean
      * @throws Horde_ActiveSync_Exception
      */
-    public function DeleteFolder($parent, $id)
+    public function deleteFolder($parent, $id)
     {
         throw new Horde_ActiveSync_Exception('DeleteFolder not yet implemented');
     }
@@ -469,7 +469,7 @@ abstract class Horde_ActiveSync_Driver_Base
      * @param $flags
      * @return unknown_type
      */
-    function SetReadFlag($folderid, $id, $flags)
+    function setReadFlag($folderid, $id, $flags)
     {
         return false;
     }
@@ -497,7 +497,7 @@ abstract class Horde_ActiveSync_Driver_Base
      * @param $newfolderid
      * @return unknown_type
      */
-    public function MoveMessage($folderid, $id, $newfolderid)
+    public function moveMessage($folderid, $id, $newfolderid)
     {
         throw new Horde_ActiveSync_Exception('moveMessage not yet implemented.');
     }
@@ -511,7 +511,7 @@ abstract class Horde_ActiveSync_Driver_Base
      * @param $calendarid
      * @return unknown_type
      */
-    public function MeetingResponse($requestid, $folderid, $error, &$calendarid)
+    public function meetingResponse($requestid, $folderid, $error, &$calendarid)
     {
         throw new Horde_ActiveSync_Exception('meetingResponse not yet implemented.');
     }
@@ -530,15 +530,28 @@ abstract class Horde_ActiveSync_Driver_Base
     }
 
     /**
+     * Specifies if this driver has an alternate way of checking for changes
+     * when PING is used.
      *
-     * @return unknown_type
+     * @return boolean
      */
-    public function AlterPing()
+    public function alterPing()
     {
         return false;
     }
 
-    public function AlterPingChanges($folderid, &$syncstate)
+    /**
+     * If this driver can check for changes in an alternate way for PING then
+     * for SYNC, this method is used to do so. Also, alterPing() should return
+     * true in this case.
+     *
+     * @param string $folderid  The folder id
+     * @param array $syncstate  The syncstate
+     *
+     * @deprecated - This will probably be removed.
+     * @return array  An array of changes, the same as retunred from getChanges
+     */
+    public function alterPingChanges($folderid, &$syncstate)
     {
         return array();
     }
index 39baa64..3926a87 100644 (file)
@@ -108,7 +108,7 @@ class Horde_ActiveSync_Request_FolderCreate extends Horde_ActiveSync_Request_Bas
             $seenfolders = array();
         }
         // Configure importer with last state
-        $importer = $this->_driver->GetHierarchyImporter();
+        $importer = $this->_driver->getHierarchyImporter();
         $importer->Config($syncstate);
 
         if (!$delete) {
index 25139fb..979f8d6 100644 (file)
@@ -23,7 +23,7 @@ class Horde_ActiveSync_Request_GetHierarchy extends Horde_ActiveSync_Request_Bas
      */
     public function handle()
     {
-        $folders = $this->_driver->GetHierarchy();
+        $folders = $this->_driver->getHierarchy();
         if (!$folders) {
             return false;
         }
index 4ac6b5f..74a48d8 100644 (file)
@@ -81,7 +81,7 @@ class Horde_ActiveSync_Request_MeetingResponse extends Horde_ActiveSync_Request_
 
         foreach ($requests as $req) {
             $calendarid = '';
-            $ok = $this->_driver->MeetingResponse($req['requestid'], $req['folderid'], $req['response'], $calendarid);
+            $ok = $this->_driver->meetingResponse($req['requestid'], $req['folderid'], $req['response'], $calendarid);
             $this->_encoder->startTag(SYNC_MEETINGRESPONSE_RESULT);
             $this->_encoder->startTag(SYNC_MEETINGRESPONSE_REQUESTID);
             $this->_encoder->content($req['requestid']);
index bfb29eb..65dd2e3 100644 (file)
@@ -76,7 +76,7 @@ class Horde_ActiveSync_Request_MoveItems extends Horde_ActiveSync_Request_Base
             $this->_encoder->content($move['srcmsgid']);
             $this->_encoder->endTag();
 
-            $importer = $this->_driver->GetContentsImporter($move['srcfldid']);
+            $importer = $this->_driver->getContentsImporter($move['srcfldid']);
             $result = $importer->importMessageMove($move['srcmsgid'], $move['dstfldid']);
 
             // We discard the importer state for now.
index fe856fb..9323a1e 100644 (file)
@@ -432,7 +432,7 @@ class Horde_ActiveSync_Request_Sync extends Horde_ActiveSync_Request_Base
 
                 /* Output any FETCH requests */
                 foreach ($collection['fetchids'] as $id) {
-                    $data = $this->_driver->Fetch($collection['id'], $id, $mimesupport);
+                    $data = $this->_driver->fetch($collection['id'], $id, $mimesupport);
                     if ($data !== false) {
                         $this->_encoder->startTag(Horde_ActiveSync::SYNC_FETCH);
                         $this->_encoder->startTag(Horde_ActiveSync::SYNC_SERVERENTRYID);
index 98c6c08..31360cb 100644 (file)
@@ -550,10 +550,9 @@ class Horde_ActiveSync_State_File extends Horde_ActiveSync_State_Base
             /* do nothing if it is a dummy folder */
             if ($folderId != Horde_ActiveSync::FOLDER_TYPE_DUMMY) {
                 // on ping: check if backend supports alternative PING mechanism & use it
-                if ($this->_collection['class'] === false && $flags == Horde_ActiveSync::BACKEND_DISCARD_DATA && $this->_backend->AlterPing()) {
+                if ($this->_collection['class'] === false && $flags == Horde_ActiveSync::BACKEND_DISCARD_DATA && $this->_backend->alterPing()) {
                     //@TODO - look at the passing of syncstate here - should probably pass self??
-                    // Not even sure if we need this AlterPing?
-                    $this->_changes = $this->_backend->AlterPingChanges($folderId, $syncState);
+                    $this->_changes = $this->_backend->alterPingChanges($folderId, $syncState);
                 } else {
                     /* Get our lists - syncstate (old)  and msglist (new) */
                     $msglist = $this->_backend->getMessageList($this->_collection['id'], $cutoffdate);