当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Mail_Storage_Folder::getLocalName方法代码示例

本文整理汇总了PHP中Zend_Mail_Storage_Folder::getLocalName方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Mail_Storage_Folder::getLocalName方法的具体用法?PHP Zend_Mail_Storage_Folder::getLocalName怎么用?PHP Zend_Mail_Storage_Folder::getLocalName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Mail_Storage_Folder的用法示例。


在下文中一共展示了Zend_Mail_Storage_Folder::getLocalName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transformToFolderDto

 /**
  * Transforms an imap Zend_Mail_Storage_Folder to an instance
  * of Conjoon_Modules_Groupware_Email_Folder_Dto.
  *
  * @param Zend_Mail_Storage_Folder $folder
  * @param boolean $lookupStandardNames Whether standard names like "INBOX"
  * and trash should be looked up and addiotnal properties adjusted for them.
  * @param array $config A preset set of config properties which are used
  * for the properties of the created FolderDto. By now, only the id, the
  * idForPath and the pendingCount property  are considered.
  *
  * @return Conjoon_Modules_Groupware_Email_Folder_Dto
  */
 public static function transformToFolderDto(Zend_Mail_Storage_Folder $folder, $lookupStandardNames = false, array $config = array())
 {
     /**
      * @see Conjoon_Modules_Groupware_Email_Folder_Dto
      */
     require_once 'Conjoon/Modules/Groupware/Email/Folder/Dto.php';
     $tmpFolder = new Conjoon_Modules_Groupware_Email_Folder_Dto();
     // go through predefined variables
     if (isset($config['id'])) {
         $tmpFolder->id = $config['id'];
     } else {
         $tmpFolder->id = $folder->getGlobalName();
     }
     if (isset($config['idForPath'])) {
         $tmpFolder->idForPath = $config['idForPath'];
     } else {
         $tmpFolder->idForPath = $folder->getGlobalName();
     }
     if (isset($config['pendingCount'])) {
         $tmpFolder->pendingCount = $config['pendingCount'];
     }
     $childCount = 0;
     if (isset($config['childCount'])) {
         $childCount = $config['childCount'];
     }
     $tmpFolder->type = $config['type'];
     $tmpFolder->name = $folder->getLocalName();
     $tmpFolder->isChildAllowed = 1;
     $tmpFolder->isLocked = 0;
     //hasChildren doesnt seem to work
     $tmpFolder->childCount = $childCount;
     $tmpFolder->isSelectable = $folder->isSelectable() ? 1 : 0;
     return $tmpFolder;
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:47,代码来源:ImapHelper.php


注:本文中的Zend_Mail_Storage_Folder::getLocalName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。