本文整理汇总了PHP中Tinebase_Helper::replaceSpecialChars方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Helper::replaceSpecialChars方法的具体用法?PHP Tinebase_Helper::replaceSpecialChars怎么用?PHP Tinebase_Helper::replaceSpecialChars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Helper
的用法示例。
在下文中一共展示了Tinebase_Helper::replaceSpecialChars方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _generateUserWithSchema3
/**
* schema 3 = 1-x chars of firstname . lastname
*
* @param Tinebase_Model_FullUser $_account
* @return string
*/
protected function _generateUserWithSchema3($_account)
{
$result = $_account->accountLastName;
for ($i = 0; $i < strlen($_account->accountFirstName); $i++) {
$userName = strtolower(substr(Tinebase_Helper::replaceSpecialChars($_account->accountFirstName), 0, $i + 1) . '.' . Tinebase_Helper::replaceSpecialChars($_account->accountLastName));
if (!$this->nameExists('accountLoginName', $userName)) {
$result = $userName;
break;
}
}
return $result;
}
示例2: decodeFolderName
/**
* decode foldername given by IMAP server (convert from UTF7-IMAP to UTF8)
*
* @param string $_folderName
* @return string
*/
public static function decodeFolderName($_folderName)
{
if (extension_loaded('mbstring')) {
$result = mb_convert_encoding($_folderName, "utf-8", "UTF7-IMAP");
} else {
if (extension_loaded('imap')) {
$result = iconv('ISO-8859-1', 'utf-8', imap_utf7_decode($_folderName));
} else {
// fallback
$result = Tinebase_Helper::replaceSpecialChars($_folderName);
}
}
return $result;
}