コード例 #1
0
ファイル: class_dbstorage.php プロジェクト: JDevelopers/Mail
 /**
  * @return FolderCollection
  */
 function &GetFolders()
 {
     if (!$this->_dbConnection->Execute($this->_commandCreator->GetFolders($this->Account->Id))) {
         $null = null;
         return $null;
     }
     $folders = array();
     while (false !== ($row = $this->_dbConnection->GetNextRecord())) {
         $folder = new Folder($this->Account->Id, (int) $row->id_folder, substr($row->full_path, 0, -1), substr($row->name, 0, -1));
         $folder->IdParent = $row->id_parent;
         $folder->Type = (int) $row->type;
         $folder->SyncType = (int) $row->sync_type;
         $folder->Hide = (bool) abs($row->hide);
         $folder->FolderOrder = (int) $row->fld_order;
         $folder->MessageCount = (int) $row->message_count;
         $folder->UnreadMessageCount = (int) $row->unread_message_count;
         $folder->Size = GetGoodBigInt($row->folder_size);
         $folder->Level = (int) $row->level;
         $folders[] =& $folder;
         unset($folder);
     }
     $folderCollection = new FolderCollection();
     $this->_addLevelToFolderTree($folderCollection, $folders);
     /* custom class */
     wm_Custom::StaticUseMethod('ChangeDbFoldersAfterGet', array(&$folderCollection));
     return $folderCollection;
 }
コード例 #2
0
 /**
  * @return FolderCollection
  */
 function &GetFolders()
 {
     if (!$this->_dbConnection->Execute($this->_commandCreator->GetFolders($this->Account->Id))) {
         $null = null;
         return $null;
     }
     $folders = array();
     while ($row = $this->_dbConnection->GetNextRecord()) {
         $folder =& new Folder($this->Account->Id, (int) $row->id_folder, substr($row->full_path, 0, -1), substr($row->name, 0, -1));
         $folder->IdParent = $row->id_parent;
         $folder->Type = (int) $row->type;
         $folder->SyncType = (int) $row->sync_type;
         $folder->Hide = (bool) abs($row->hide);
         $folder->FolderOrder = (int) $row->fld_order;
         $folder->MessageCount = (int) $row->message_count;
         $folder->UnreadMessageCount = (int) $row->unread_message_count;
         $folder->Size = (int) $row->folder_size;
         $folder->Level = (int) $row->level;
         $folders[] =& $folder;
     }
     $folderCollection =& new FolderCollection();
     $this->_addLevelToFolderTree($folderCollection, $folders);
     return $folderCollection;
 }