Documentation

Horde_ActiveSync_Utils
in package

Horde_ActiveSync_Utils:: contains general utilities.

Tags
license

http://www.horde.org/licenses/gpl GPLv2

copyright

2010-2020 Horde LLC (http://www.horde.org)

author

Michael J Rubinsky mrubinsk@horde.org

Table of Contents

createGoid()  : string
Create a MAPI GOID from a UID See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29
decodeBase64()  : array<string|int, mixed>
Decode a base64 encoded URI
ensureUtf8()  : 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...and force encoding to UTF-8 from $from_charset as a last resort.
getUidFromGoid()  : string
Obtain the UID from a MAPI GOID.
_stripNon7BitChars()  : string|bool
Strip out non 7Bit characters from a text string.

Methods

createGoid()

Create a MAPI GOID from a UID See http://msdn.microsoft.com/en-us/library/ee157690%28v=exchg.80%29

public static createGoid(string $uid[, mixed $options = array() ]) : string
Parameters
$uid : string

The UID value to encode.

$options : mixed = array()
Tags
deprecated

Will be removed in H6. Use Horde_Mapi::createGoid

Return values
string

A Base64 encoded GOID

decodeBase64()

Decode a base64 encoded URI

public static decodeBase64(mixed $uri) : array<string|int, mixed>
Parameters
$uri : mixed
Return values
array<string|int, mixed>

The decoded request

ensureUtf8()

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...and force encoding to UTF-8 from $from_charset as a last resort.

public static ensureUtf8(string $data, string $from_charset) : string
Parameters
$data : string

The string data to convert to UTF-8.

$from_charset : string

The character set to assume $data is encoded in.

Return values
string

A valid UTF-8 encoded string.

getUidFromGoid()

Obtain the UID from a MAPI GOID.

public static getUidFromGoid(string $goid) : string

See http://msdn.microsoft.com/en-us/library/hh338153%28v=exchg.80%29.aspx

Parameters
$goid : string

Base64 encoded Global Object Identifier.

Tags
deprecated

Will be removed in H6. Use Horde_Mapi::getUidFromGoid

Return values
string

The UID

_stripNon7BitChars()

Strip out non 7Bit characters from a text string.

protected static _stripNon7BitChars(string $text) : string|bool
Parameters
$text : string

The string to strip.

Return values
string|bool

The stripped string, or false if failed.

Search results