本文整理汇总了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;
}