PHP Class Horde_Xml_Wbxml_Decoder, horde

Copyright 2003-2016 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: Anthony Mills ([email protected])
Inheritance: extends Horde_Xml_Wbxml_ContentHandler
显示文件 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_attributeDTD
$_ch Currently just outputs raw XML.
$_dpi Document Public Identifier Used with dpiType.
$_dtdManager Horde_Xml_Wbxml_DtdManager The DTD Manager.
$_error
$_isAttribute
$_isData
$_prevAttributeDTD
$_stringTable String table as defined in 5.7
$_strpos integer The string position.
$_tagDTD
$_tagStack State variables.

Public Methods

Method Description
__construct ( ) Constructor.
decode ( string $wbxml ) Takes a WBXML input document and decodes it.
decodeToString ( string $wbxml ) : string Takes a WBXML input document and returns decoded XML.
endTag ( )
entity ( $entity ) Return the hex version of the base 10 $entity.
getAttribute ( $attribute )
getAttributes ( $input )
getByte ( string $input ) Return one byte from the input stream.
getCharset ( $input ) Returns the character encoding. Only default character encodings from J2SE are supported. From http://www.iana.org/assignments/character-sets and http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html
getCurrentURI ( )
getDocumentPublicIdentifier ( $input )
getDocumentPublicIdentifierImpl ( $dpiType, $dpiNumber )
getStringTableEntry ( $index )
getTag ( $tag )
getVersionNumber ( $input )
parseTag ( $input, $tag, $hasAttributes, $hasContent )
retrieveStringTable ( $input ) Retrieves the string table.
setContentHandler ( Horde_Xml_Wbxml_ContentHandler $ch ) Sets the contentHandler that will receive the output of the decoding.
startGetAttributes ( )
stopGetAttributes ( )
switchAttributeCodePage ( $codePage )
switchElementCodePage ( $codePage )
termstr ( $input ) Reads a null terminated string.
writeString ( $str )

Protected Methods

Method Description
_decode ( $input )

Method Details

__construct() public method

Constructor.
public __construct ( )

_decode() protected method

protected _decode ( $input )

decode() public method

Decoding result is directly passed to the contentHandler. A contenthandler must be set using setContentHandler prior to invocation of this method
public decode ( string $wbxml )
$wbxml string The WBXML document to decode.

decodeToString() public method

However the preferred and more effecient method is to use decode() rather than decodeToString() and have an appropriate contentHandler deal with the decoded data.
public decodeToString ( string $wbxml ) : string
$wbxml string The WBXML document to decode.
return string The decoded XML document.

endTag() public method

public endTag ( )

entity() public method

Return the hex version of the base 10 $entity.
public entity ( $entity )

getAttribute() public method

public getAttribute ( $attribute )

getAttributes() public method

public getAttributes ( $input )

getByte() public method

Return one byte from the input stream.
public getByte ( string $input )
$input string The WBXML input string.

getCharset() public method

Returns the character encoding. Only default character encodings from J2SE are supported. From http://www.iana.org/assignments/character-sets and http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html
public getCharset ( $input )

getCurrentURI() public method

public getCurrentURI ( )

getDocumentPublicIdentifier() public method

public getDocumentPublicIdentifier ( $input )

getDocumentPublicIdentifierImpl() public method

public getDocumentPublicIdentifierImpl ( $dpiType, $dpiNumber )

getStringTableEntry() public method

public getStringTableEntry ( $index )

getTag() public method

public getTag ( $tag )

getVersionNumber() public method

public getVersionNumber ( $input )

parseTag() public method

public parseTag ( $input, $tag, $hasAttributes, $hasContent )

retrieveStringTable() public method

The string table consists of an mb_u_int32 length and then length bytes forming the table. References to the string table refer to the starting position of the (null terminated) string in this table.
public retrieveStringTable ( $input )

setContentHandler() public method

Sets the contentHandler that will receive the output of the decoding.
public setContentHandler ( Horde_Xml_Wbxml_ContentHandler $ch )
$ch Horde_Xml_Wbxml_ContentHandler The contentHandler

startGetAttributes() public method

public startGetAttributes ( )

stopGetAttributes() public method

public stopGetAttributes ( )

switchAttributeCodePage() public method

public switchAttributeCodePage ( $codePage )

switchElementCodePage() public method

public switchElementCodePage ( $codePage )

termstr() public method

Reads a null terminated string.
public termstr ( $input )

writeString() public method

public writeString ( $str )

Property Details

$_attributeDTD protected_oe property

protected $_attributeDTD

$_ch protected_oe property

Currently just outputs raw XML.
protected $_ch

$_dpi protected_oe property

Document Public Identifier Used with dpiType.
protected $_dpi

$_dtdManager protected_oe property

The DTD Manager.
protected Horde_Xml_Wbxml_DtdManager $_dtdManager
return Horde_Xml_Wbxml_DtdManager

$_error protected_oe property

protected $_error

$_isAttribute protected_oe property

protected $_isAttribute

$_isData protected_oe property

protected $_isData

$_prevAttributeDTD protected_oe property

protected $_prevAttributeDTD

$_stringTable protected_oe property

String table as defined in 5.7
protected $_stringTable

$_strpos protected_oe property

The string position.
protected int $_strpos
return integer

$_tagDTD protected_oe property

protected $_tagDTD

$_tagStack protected_oe property

State variables.
protected $_tagStack