Horde_Xml_Wbxml_Decoder
extends Horde_Xml_Wbxml_ContentHandler
in package
From Binary XML Content Format Specification Version 1.3, 25 July 2001 found at http://www.wapforum.org
Copyright 2003-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- $_attributeDTD : mixed
- $_ch : mixed
- Content handler.
- $_charset : mixed
- Charset.
- $_currentUri : mixed
- $_dpi : mixed
- Document Public Identifier type 1 mb_u_int32 well known type 2 string table from spec but converted into a string.
- $_dtdManager : Horde_Xml_Wbxml_DtdManager
- The DTD Manager.
- $_error : mixed
- $_isAttribute : mixed
- $_isData : mixed
- $_opaqueHandler : mixed
- $_output : mixed
- $_prevAttributeDTD : mixed
- $_stringTable : mixed
- String table as defined in 5.7
- $_strpos : int
- The string position.
- $_tagDTD : mixed
- $_tagStack : mixed
- State variables.
- $_wbxmlVersion : mixed
- WBXML Version.
- __construct() : mixed
- Constructor.
- characters() : mixed
- createSubHandler() : mixed
- decode() : mixed
- Takes a WBXML input document and decodes it.
- decodeToString() : string
- Takes a WBXML input document and returns decoded XML.
- endElement() : mixed
- endTag() : mixed
- entity() : mixed
- Return the hex version of the base 10 $entity.
- getAttribute() : mixed
- getAttributes() : mixed
- getByte() : mixed
- Return one byte from the input stream.
- getCharset() : mixed
- 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
- getCharsetStr() : mixed
- getCurrentURI() : mixed
- getDocumentPublicIdentifier() : mixed
- getDocumentPublicIdentifierImpl() : mixed
- getOutput() : mixed
- getOutputSize() : mixed
- getStringTableEntry() : mixed
- getTag() : mixed
- getVersion() : mixed
- getVersionNumber() : mixed
- opaque() : mixed
- parseTag() : mixed
- removeOpaqueHandler() : mixed
- retrieveStringTable() : mixed
- Retrieves the string table.
- setCharset() : mixed
- setContentHandler() : mixed
- Sets the contentHandler that will receive the output of the decoding.
- setOpaqueHandler() : mixed
- setVersion() : mixed
- startElement() : mixed
- startGetAttributes() : mixed
- stopGetAttributes() : mixed
- switchAttributeCodePage() : mixed
- switchElementCodePage() : mixed
- termstr() : mixed
- Reads a null terminated string.
- writeString() : mixed
- _decode() : mixed
Properties
$_attributeDTD
protected
mixed
$_attributeDTD
$_ch
Content handler.
protected
mixed
$_ch
Currently just outputs raw XML.
$_charset
Charset.
protected
mixed
$_charset
= 'UTF-8'
$_currentUri
protected
mixed
$_currentUri
$_dpi
Document Public Identifier type 1 mb_u_int32 well known type 2 string table from spec but converted into a string.
protected
mixed
$_dpi
Document Public Identifier Used with dpiType.
$_dtdManager
The DTD Manager.
protected
Horde_Xml_Wbxml_DtdManager
$_dtdManager
$_error
protected
mixed
$_error
= alse
$_isAttribute
protected
mixed
$_isAttribute
$_isData
protected
mixed
$_isData
= alse
$_opaqueHandler
protected
mixed
$_opaqueHandler
$_output
protected
mixed
$_output
= ''
$_prevAttributeDTD
protected
mixed
$_prevAttributeDTD
$_stringTable
String table as defined in 5.7
protected
mixed
$_stringTable
= array()
$_strpos
The string position.
protected
int
$_strpos
$_tagDTD
protected
mixed
$_tagDTD
$_tagStack
State variables.
protected
mixed
$_tagStack
= array()
$_wbxmlVersion
WBXML Version.
protected
mixed
$_wbxmlVersion
= 2
1, 2, or 3 supported
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —characters()
public
characters(mixed $str) : mixed
Parameters
- $str : mixed
Return values
mixed —createSubHandler()
public
createSubHandler() : mixed
Return values
mixed —decode()
Takes a WBXML input document and decodes it.
public
decode(string $wbxml) : mixed
Decoding result is directly passed to the contentHandler. A contenthandler must be set using setContentHandler prior to invocation of this method
Parameters
- $wbxml : string
-
The WBXML document to decode.
Tags
Return values
mixed —decodeToString()
Takes a WBXML input document and returns decoded XML.
public
decodeToString(string $wbxml) : string
However the preferred and more effecient method is to use decode() rather than decodeToString() and have an appropriate contentHandler deal with the decoded data.
Parameters
- $wbxml : string
-
The WBXML document to decode.
Tags
Return values
string —The decoded XML document.
endElement()
public
endElement(mixed $uri, mixed $element) : mixed
Parameters
- $uri : mixed
- $element : mixed
Return values
mixed —endTag()
public
endTag() : mixed
Return values
mixed —entity()
Return the hex version of the base 10 $entity.
public
entity(mixed $entity) : mixed
Parameters
- $entity : mixed
Return values
mixed —getAttribute()
public
getAttribute(mixed $attribute) : mixed
Parameters
- $attribute : mixed
Return values
mixed —getAttributes()
public
getAttributes(mixed $input) : mixed
Parameters
- $input : mixed
Return values
mixed —getByte()
Return one byte from the input stream.
public
getByte(string $input) : mixed
Parameters
- $input : string
-
The WBXML input string.
Return values
mixed —getCharset()
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(mixed $input) : mixed
Parameters
- $input : mixed
Return values
mixed —getCharsetStr()
public
getCharsetStr() : mixed
Return values
mixed —getCurrentURI()
public
getCurrentURI() : mixed
Return values
mixed —getDocumentPublicIdentifier()
public
getDocumentPublicIdentifier(mixed $input) : mixed
Parameters
- $input : mixed
Return values
mixed —getDocumentPublicIdentifierImpl()
public
getDocumentPublicIdentifierImpl(mixed $dpiType, mixed $dpiNumber) : mixed
Parameters
- $dpiType : mixed
- $dpiNumber : mixed
Return values
mixed —getOutput()
public
getOutput() : mixed
Return values
mixed —getOutputSize()
public
getOutputSize() : mixed
Return values
mixed —getStringTableEntry()
public
getStringTableEntry(mixed $index) : mixed
Parameters
- $index : mixed
Return values
mixed —getTag()
public
getTag(mixed $tag) : mixed
Parameters
- $tag : mixed
Return values
mixed —getVersion()
public
getVersion() : mixed
Return values
mixed —getVersionNumber()
public
getVersionNumber(mixed $input) : mixed
Parameters
- $input : mixed
Return values
mixed —opaque()
public
opaque(mixed $o) : mixed
Parameters
- $o : mixed
Return values
mixed —parseTag()
public
parseTag(mixed $input, mixed $tag, mixed $hasAttributes, mixed $hasContent) : mixed
Parameters
- $input : mixed
- $tag : mixed
- $hasAttributes : mixed
- $hasContent : mixed
Return values
mixed —removeOpaqueHandler()
public
removeOpaqueHandler() : mixed
Return values
mixed —retrieveStringTable()
Retrieves the string table.
public
retrieveStringTable(mixed $input) : mixed
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.
Parameters
- $input : mixed
Return values
mixed —setCharset()
public
setCharset(mixed $cs) : mixed
Parameters
- $cs : mixed
Return values
mixed —setContentHandler()
Sets the contentHandler that will receive the output of the decoding.
public
setContentHandler(Horde_Xml_Wbxml_ContentHandler $ch) : mixed
Parameters
- $ch : Horde_Xml_Wbxml_ContentHandler
-
The contentHandler
Return values
mixed —setOpaqueHandler()
public
setOpaqueHandler(mixed $opaqueHandler) : mixed
Parameters
- $opaqueHandler : mixed
Return values
mixed —setVersion()
public
setVersion(mixed $v) : mixed
Parameters
- $v : mixed
Return values
mixed —startElement()
public
startElement(mixed $uri, mixed $element[, mixed $attrs = array() ]) : mixed
Parameters
- $uri : mixed
- $element : mixed
- $attrs : mixed = array()
Return values
mixed —startGetAttributes()
public
startGetAttributes() : mixed
Return values
mixed —stopGetAttributes()
public
stopGetAttributes() : mixed
Return values
mixed —switchAttributeCodePage()
public
switchAttributeCodePage(mixed $codePage) : mixed
Parameters
- $codePage : mixed
Return values
mixed —switchElementCodePage()
public
switchElementCodePage(mixed $codePage) : mixed
Parameters
- $codePage : mixed
Return values
mixed —termstr()
Reads a null terminated string.
public
termstr(mixed $input) : mixed
Parameters
- $input : mixed
Return values
mixed —writeString()
public
writeString(mixed $str) : mixed
Parameters
- $str : mixed
Return values
mixed —_decode()
protected
_decode(mixed $input) : mixed
Parameters
- $input : mixed