PHP Class Horde_Mapi, horde

Copyright 2009-2014 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael J Rubinsky ([email protected])
显示文件 Open project: horde/horde Class Usage Examples

Public Methods

Method Description
chbo ( integer $num ) : integer Change the byte order of a number. Used to allow big endian machines to decode the timezone blobs, which are encoded in little endian order.
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
filetimeToUnixtime ( string $ft ) : integer Converts a Windows FILETIME value to a unix timestamp.
getUidFromGoid ( string $goid ) : string Obtain the UID from a MAPI GOID.
isLittleEndian ( ) : boolean Determine if the current machine is little endian.

Protected Methods

Method Description
_flipEndian ( $str ) swap little-endian to big-endian
_hexToBcint ( $str ) convert hex string to BC-int
_win64ToUnix ( Math_BigInteger $bci ) : string

Method Details

_flipEndian() protected static method

swap little-endian to big-endian
protected static _flipEndian ( $str )

_hexToBcint() protected static method

convert hex string to BC-int
protected static _hexToBcint ( $str )

_win64ToUnix() protected static method

protected static _win64ToUnix ( Math_BigInteger $bci ) : string
$bci Math_BigInteger
return string

chbo() public static method

Change the byte order of a number. Used to allow big endian machines to decode the timezone blobs, which are encoded in little endian order.
public static chbo ( integer $num ) : integer
$num integer The number to reverse.
return integer The number, in the reverse byte order.

createGoid() public static method

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, $options = [] ) : string
$uid string The UID value to encode.
return string A Base64 encoded GOID

filetimeToUnixtime() public static method

Adapted from: http://stackoverflow.com/questions/610603/help-me-translate-long-value-expressed-in-hex-back-in-to-a-date-time
public static filetimeToUnixtime ( string $ft ) : integer
$ft string Binary representation of FILETIME from a pTypDate MAPI property.
return integer The unix timestamp.

getUidFromGoid() public static method

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

isLittleEndian() public static method

Determine if the current machine is little endian.
public static isLittleEndian ( ) : boolean
return boolean True if endianness is little endian, otherwise false.