Horde_Kolab_Storage_Driver::fetchStructure PHP Method

fetchStructure() public method

Retrieves the messages for the given message ids.
public fetchStructure ( string $folder, array $uids ) : array
$folder string The folder to fetch the messages from.
$uids array The message UIDs.
return array An array of message structures parsed into Horde_Mime_Part instances.
    public function fetchStructure($folder, $uids);

Usage Example

コード例 #1
0
ファイル: Base.php プロジェクト: platolin/horde
 /**
  * Retrieves the objects for the given UIDs.
  *
  * @param array   $uids The message UIDs.
  * @param boolean $raw  True if the raw format should be returned rather than
  *                      the parsed data.
  *
  * @return array An array of objects.
  * @throws new Horde_Kolab_Storage_Exception
  */
 public function fetch($uids, $raw = false)
 {
     if (empty($uids)) {
         return array();
     }
     if ($raw === false) {
         $writer = new Horde_Kolab_Storage_Object_Writer_Format(new Horde_Kolab_Format_Factory(), array('version' => $this->_version));
     } else {
         $writer = new Horde_Kolab_Storage_Object_Writer_Raw();
     }
     $objects = array();
     $structures = $this->_driver->fetchStructure($this->_folder->getPath(), $uids);
     foreach ($structures as $uid => $structure) {
         if (!isset($structure['structure'])) {
             throw new Horde_Kolab_Storage_Exception('Backend returned a structure without the expected "structure" element.');
         }
         $object = new Horde_Kolab_Storage_Object();
         $object->setDriver($this->_driver);
         $object->load($uid, $this->_folder, $writer, $structure['structure']);
         $objects[$uid] = $object;
     }
     return $objects;
 }
All Usage Examples Of Horde_Kolab_Storage_Driver::fetchStructure