本文整理汇总了PHP中Horde_Url::uriB64Decode方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Url::uriB64Decode方法的具体用法?PHP Horde_Url::uriB64Decode怎么用?PHP Horde_Url::uriB64Decode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Horde_Url
的用法示例。
在下文中一共展示了Horde_Url::uriB64Decode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _idDeconstruct
/**
* Deconstruct the ID elements from the ID string
*
* @param string $id The ID to be deconstructed.
*
* @return array A tuple of (owner, folder subpath).
*/
private function _idDeconstruct($id)
{
if (!($decoded_id = Horde_Url::uriB64Decode($id))) {
$msg = sprintf('Share id %s is invalid.', $id);
$this->_logger->err($msg);
throw new Horde_Exception_NotFound($msg);
}
if (!($sid = @unserialize($decoded_id))) {
$msg = sprintf('Share id %s is invalid.', $decoded_id);
$this->_logger->err($msg);
throw new Horde_Exception_NotFound($msg);
}
return $sid;
}
示例2: _delete
/**
* Deletes a task from the backend.
*
* @param string $taskId The task to delete.
*/
protected function _delete($taskId)
{
$this->_getData()->delete(Horde_Url::uriB64Decode($taskId));
}
示例3: _decode
/**
* Decode a token into the prefixed nonce and the hash.
*
* @param string $token The token to be decomposed.
*
* @return array An array of two elements: The nonce and the hash.
*/
private function _decode($token)
{
$b = Horde_Url::uriB64Decode($token);
return array(substr($b, 0, 6), substr($b, 6));
}
示例4: _convertMembers
/**
* TODO
*/
protected function _convertMembers(&$attributes)
{
if (isset($attributes['__members'])) {
$member_ids = unserialize($attributes['__members']);
$attributes['member'] = array();
foreach ($member_ids as $member_id) {
$source_id = null;
if (strpos($member_id, ':')) {
list($source_id, $member_id) = explode(':', $member_id, 2);
}
$mail = array('uid' => Horde_Url::uriB64Decode($member_id));
$member = null;
if ($source_id) {
try {
$driver = $GLOBALS['injector']->getInstance('Turba_Factory_Driver')->create($source_id);
try {
$member = $driver->getObject($member_id);
$name = $member->getValue('name');
if (!empty($name)) {
$mail['display-name'] = $name;
}
$emails = $member->getValue('emails');
if ($emails) {
$emails = explode(',', $emails);
$mail['smtp-address'] = trim($emails[0]);
if (!isset($mail['display-name'])) {
$mail['display-name'] = $mail['smtp-address'];
}
}
} catch (Horde_Exception_NotFound $e) {
}
} catch (Turba_Exception $e) {
}
} elseif (isset($this->_contacts_cache[$member_id])) {
$member = $this->_contacts_cache[$member_id];
if (!empty($member['full-name'])) {
$mail['display-name'] = $member['full-name'];
}
if (!empty($member['emails'])) {
$emails = explode(',', $member['emails']);
$mail['smtp-address'] = trim($emails[0]);
if (!isset($mail['display-name'])) {
$mail['display-name'] = $mail['smtp-address'];
}
}
}
$attributes['member'][] = $mail;
}
unset($attributes['__members']);
}
}
示例5: _delete
/**
* Deletes a note permanently.
*
* @param array $note The note to delete.
*
* @return string The note's UID.
* @throws Mnemo_Exception
*/
protected function _delete($noteId)
{
$this->synchronize();
$uid = Horde_Url::uriB64Decode($noteId);
try {
$this->_getData()->delete($uid);
} catch (Horde_Kolab_Storage_Exception $e) {
throw new Mnemo_Exception($e);
}
return $uid;
}