PHP Class Horde_ActiveSync_Wbxml_Decoder, horde

Author: Michael J Rubinsky ([email protected])
Inheritance: extends Horde_ActiveSync_Wbxml
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$charsetid
$publicid
$publicstringid
$stringtable
$version integer Store the wbxml version value. Used to verify we have a valid wbxml input stream.

Protected Properties

Свойство Type Description
$_attrcp
$_buffer stream Temporary string buffer
$_isWbxml boolean Flag to indicate we have a valid wbxml input stream
$_lastStartElement array Cache the last successfully fetched start tag array. Used to be able to easily detected emtpy nodes after the element was already fetched.
$_readHeader
$_ungetbuffer

Méthodes publiques

Méthode Description
_ungetElement ( array $element ) : void Unget the specified element from the stream. Places the element into the unget buffer.
getElement ( ) : array | boolean Returns either start, content or end, and auto-concatenates successive content.
getElementContent ( ) : mixed Get the element contents
getElementEndTag ( ) : array | boolean Get the next tag, which is assumed to be an end tag.
getElementStartTag ( string $tag ) : array | boolean Get the next tag, which is assumed to be a start tag.
getFullInputStream ( ) : resource Return the full, raw, input stream. Used for things like SendMail request where we don't have wbxml to parse. The calling code is responsible for closing the stream.
getLastStartElement ( ) : array | boolean Returns the last element array fetched using getElementStartTag()
getToken ( ) : array Get the next [start | content | end] tag.
isEmptyElement ( array $el ) : boolean Returns whether or not the passed in element array represents an empty tag.
isWbxml ( ) : boolean Check that the input stream contains wbxml. Basically looks for a valid WBXML_VERSION header. self::readWbxmlHeader MUST have been called already.
peek ( ) : array Peek at the next element in the stream.
readWbxmlHeader ( ) Start reading the wbxml stream, pulling off the initial header and populate the properties.

Méthodes protégées

Méthode Description
_getAttributes ( ) : mixed Get the element attributes
_getByte ( ) : string Fetch a single byte from the stream.
_getMBUInt ( ) : integer Get an MBU integer
_getMapping ( integer $cp, integer $id ) : mixed Get a dtd mapping
_getOpaque ( integer $len ) : string Get an opaque value from the stream of the specified length.
_getStringTable ( ) : string Fetch the string table. Don't think we use the results anywhere though.
_getStringTableEntry ( integer $id ) : string Really don't know for sure what this method is supposed to do, it is called from numerous places in this class, but the original zpush code did not contain this method.
_getTempStream ( ) : stream Return the temporary buffer stream.
_getTermStr ( ) : string Get a null terminated string from the stream.
_getToken ( ) : array Get the next start tag, content or end tag
_logToken ( $el ) : void Log the token.
_readVersion ( ) Read the Wbxml version header byte, and buffer the input incase we need the full stream later.
_splitAttribute ( string $attr ) : array Parses an attribute string

Method Details

_getAttributes() protected méthode

Get the element attributes
protected _getAttributes ( ) : mixed
Résultat mixed The value of the element's attributes.

_getByte() protected méthode

Fetch a single byte from the stream.
protected _getByte ( ) : string
Résultat string The single byte.

_getMBUInt() protected méthode

Get an MBU integer
protected _getMBUInt ( ) : integer
Résultat integer

_getMapping() protected méthode

Get a dtd mapping
protected _getMapping ( integer $cp, integer $id ) : mixed
$cp integer The codepage to use.
$id integer The property.
Résultat mixed The mapped value.

_getOpaque() protected méthode

Get an opaque value from the stream of the specified length.
protected _getOpaque ( integer $len ) : string
$len integer The length of the data to fetch.
Résultat string A string of bytes representing the opaque value.

_getStringTable() protected méthode

Fetch the string table. Don't think we use the results anywhere though.
protected _getStringTable ( ) : string
Résultat string The string table.

_getStringTableEntry() protected méthode

..so, either it's completely broken, or normal use-cases do not reach the calling code. Either way, it needs to eventually be fixed.
protected _getStringTableEntry ( integer $id ) : string
$id integer The entry to return??
Résultat string

_getTempStream() protected méthode

Return the temporary buffer stream.
protected _getTempStream ( ) : stream
Résultat stream

_getTermStr() protected méthode

Get a null terminated string from the stream.
protected _getTermStr ( ) : string
Résultat string The string

_getToken() protected méthode

Get the next start tag, content or end tag
protected _getToken ( ) : array
Résultat array The element array.

_logToken() protected méthode

Log the token.
protected _logToken ( $el ) : void
Résultat void

_readVersion() protected méthode

Read the Wbxml version header byte, and buffer the input incase we need the full stream later.
protected _readVersion ( )

_splitAttribute() protected méthode

Parses an attribute string
protected _splitAttribute ( string $attr ) : array
$attr string The raw attribute value.
Résultat array The attribute hash

_ungetElement() public méthode

Unget the specified element from the stream. Places the element into the unget buffer.
public _ungetElement ( array $element ) : void
$element array The element array to unget.
Résultat void

getElement() public méthode

Returns either start, content or end, and auto-concatenates successive content.
public getElement ( ) : array | boolean
Résultat array | boolean The element structure or false on failure.

getElementContent() public méthode

Get the element contents
public getElementContent ( ) : mixed
Résultat mixed The content of the current element | false on failure.

getElementEndTag() public méthode

Get the next tag, which is assumed to be an end tag.
public getElementEndTag ( ) : array | boolean
Résultat array | boolean The element array | false on failure.

getElementStartTag() public méthode

Get the next tag, which is assumed to be a start tag.
public getElementStartTag ( string $tag ) : array | boolean
$tag string The element that this should be a start tag for.
Résultat array | boolean The start tag array | false on failure.

getFullInputStream() public méthode

Return the full, raw, input stream. Used for things like SendMail request where we don't have wbxml to parse. The calling code is responsible for closing the stream.
public getFullInputStream ( ) : resource
Résultat resource

getLastStartElement() public méthode

Returns the last element array fetched using getElementStartTag()
public getLastStartElement ( ) : array | boolean
Résultat array | boolean The element array, or false if none available.

getToken() public méthode

Get the next [start | content | end] tag.
public getToken ( ) : array
Résultat array The next, complete, token array.

isEmptyElement() public méthode

Returns whether or not the passed in element array represents an empty tag.
public isEmptyElement ( array $el ) : boolean
$el array The element array.
Résultat boolean True if $el is an empty start tag, otherwise false.

isWbxml() public méthode

Check that the input stream contains wbxml. Basically looks for a valid WBXML_VERSION header. self::readWbxmlHeader MUST have been called already.
public isWbxml ( ) : boolean
Résultat boolean

peek() public méthode

Peek at the next element in the stream.
public peek ( ) : array
Résultat array The next element in the stream.

readWbxmlHeader() public méthode

Start reading the wbxml stream, pulling off the initial header and populate the properties.
public readWbxmlHeader ( )

Property Details

$_attrcp protected_oe property

protected $_attrcp

$_buffer protected_oe property

Temporary string buffer
protected stream $_buffer
Résultat stream

$_isWbxml protected_oe property

Flag to indicate we have a valid wbxml input stream
protected bool $_isWbxml
Résultat boolean

$_lastStartElement protected_oe property

Cache the last successfully fetched start tag array. Used to be able to easily detected emtpy nodes after the element was already fetched.
protected array $_lastStartElement
Résultat array

$_readHeader protected_oe property

protected $_readHeader

$_ungetbuffer protected_oe property

protected $_ungetbuffer

$charsetid public_oe property

public $charsetid

$publicid public_oe property

public $publicid

$publicstringid public_oe property

public $publicstringid

$stringtable public_oe property

public $stringtable

$version public_oe property

Store the wbxml version value. Used to verify we have a valid wbxml input stream.
public int $version
Résultat integer