PHP Class Horde_ActiveSync_Utils, horde

Author: Michael J Rubinsky ([email protected])
Show file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
createGoid ( string $uid, $options = [] ) : string Create a MAPI GOID from a UID See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29
decodeBase64 ( $uri ) : array Decode a base64 encoded URI
ensureUtf8 ( string $data, string $from_charset ) : string Ensure $data is converted to valid UTF-8 data. Works as follows: Converts to UTF-8, assuming data is in $from_charset encoding. If that produces invalid UTF-8, attempt to convert to most common mulitibyte encodings. If that *still* fails, strip out non 7-Bit characters.
getUidFromGoid ( string $goid ) : string Obtain the UID from a MAPI GOID.

Protected Methods

Method Description
_stripNon7BitChars ( string $text ) : string | boolean Strip out non 7Bit characters from a text string.

Method Details

_stripNon7BitChars() protected static method

Strip out non 7Bit characters from a text string.
protected static _stripNon7BitChars ( string $text ) : string | boolean
$text string The string to strip.
return string | boolean The stripped string, or false if failed.

createGoid() public static method

Create a MAPI GOID from a UID See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29
Deprecation: Will be removed in H6. Use Horde_Mapi::createGoid
public static createGoid ( string $uid, $options = [] ) : string
$uid string The UID value to encode.
return string A Base64 encoded GOID

decodeBase64() public static method

Decode a base64 encoded URI
public static decodeBase64 ( $uri ) : array
return array The decoded request

ensureUtf8() public static method

..and force encoding to UTF-8 from $from_charset as a last resort.
public static ensureUtf8 ( string $data, string $from_charset ) : string
$data string The string data to convert to UTF-8.
$from_charset string The character set to assume $data is encoded in.
return string A valid UTF-8 encoded string.

getUidFromGoid() public static method

See http://msdn.microsoft.com/en-us/library/hh338153%28v=exchg.80%29.aspx
Deprecation: Will be removed in H6. Use Horde_Mapi::getUidFromGoid
public static getUidFromGoid ( string $goid ) : string
$goid string Base64 encoded Global Object Identifier.
return string The UID