Constants

SWITCH_PAGE

SWITCH_PAGE

END

END

ENTITY

ENTITY

STR_I

STR_I

LITERAL

LITERAL

EXT_I_0

EXT_I_0

EXT_I_1

EXT_I_1

EXT_I_2

EXT_I_2

PI

PI

LITERAL_C

LITERAL_C

EXT_T_0

EXT_T_0

EXT_T_1

EXT_T_1

EXT_T_2

EXT_T_2

STR_T

STR_T

LITERAL_A

LITERAL_A

EXT_0

EXT_0

EXT_1

EXT_1

EXT_2

EXT_2

OPAQUE

OPAQUE

LITERAL_AC

LITERAL_AC

EN_TYPE

EN_TYPE

EN_TAG

EN_TAG

EN_CONTENT

EN_CONTENT

EN_FLAGS

EN_FLAGS

EN_ATTRIBUTES

EN_ATTRIBUTES

EN_TYPE_STARTTAG

EN_TYPE_STARTTAG

EN_TYPE_ENDTAG

EN_TYPE_ENDTAG

EN_TYPE_CONTENT

EN_TYPE_CONTENT

EN_FLAGS_CONTENT

EN_FLAGS_CONTENT

EN_FLAGS_ATTRIBUTES

EN_FLAGS_ATTRIBUTES

WBXML_VERSION

WBXML_VERSION

LOG_DETAILED

LOG_DETAILED

LOG_PROTOCOL

LOG_PROTOCOL

LOG_MAXCONTENT

LOG_MAXCONTENT

Properties

$multipart

$multipart : boolean

Flag to indicate if we are outputing multipart binary data during e.g., ITEMOPERATION requests.

Type

boolean

$_dtd

$_dtd : array

The code page definitions for the wbxml encoder/decoders

Type

array

$_tagcp

$_tagcp : integer

Track the codepage for the currently output tag so we know when to switch codepages.

Type

integer

$_logStack

$_logStack : array

Used to hold log entries for each tag so we can only output the log entries for the tags that are actually sent (@see $_stack).

Type

array

$_logger

$_logger : \Horde_Log_Logger

Logger

Type

\Horde_Log_Logger

$_stream

$_stream : \Horde_Stream

Input or Output stream

Type

\Horde_Stream

$_procid

$_procid : integer

The current procid

Type

integer

$_logLevel

$_logLevel : 

Logging level.

Type

$_parts

$_parts : array

Collection of parts to send in MULTIPART responses.

Type

array

$_tempStream

$_tempStream : resource

Private stream when handling multipart output

Type

resource

$_stack

$_stack : array

Cache the tags to output. The stack is output when content() is called.

We only output tags when they actually contain something. i.e. calling startTag() 10 times, then endTag() will cause 0 bytes of output apart from the header.

Type

array

Methods

__construct()

__construct(\stream  $output, integer  $log_level = self::LOG_PROTOCOL) : \Horde_ActiveSync_Wbxml_Encoder

Const'r

Parameters

\stream $output

The output stream

integer $log_level

The logging level

Returns

\Horde_ActiveSync_Wbxml_Encoder

getStream()

getStream() 

setLogger()

setLogger(\Horde_Log_Logger  $logger) 

Set the logger instance

Parameters

\Horde_Log_Logger $logger

The logger.

startWBXML()

startWBXML(boolean  $multipart = false) 

Starts the wbxml output.

Parameters

boolean $multipart

Indicates we need to output mulitpart binary binary data. See MS-ASCMD 2.2.1.8.1

outputWbxmlHeader()

outputWbxmlHeader() 

Output the Wbxml header to the output stream.

startTag()

startTag(string  $tag, mixed  $attributes = false, boolean  $output_empty = false) 

Start output for the specified tag

Parameters

string $tag

The name of the tag to start

mixed $attributes

Any attributes for the start tag

boolean $output_empty

Force output of empty tags

endTag()

endTag() 

Output the end tag

content()

content(mixed  $content) 

Output the tag content

Parameters

mixed $content

The value to output for this tag. A string or a stream resource.

addPart()

addPart(mixed  $data) 

Add a mulitpart part to be output.

Parameters

mixed $data

The part data. A string or stream resource.

getParts()

getParts() : array

Return the parts array.

Returns

array

_outputStack()

_outputStack() 

Output any tags on the stack that haven't been output yet

_startTag()

_startTag(string  $tag, mixed  $attributes = false, boolean  $output_empty = false) 

Actually outputs the start tag

Parameters

string $tag

@see Horde_ActiveSync_Wbxml_Encoder::startTag

mixed $attributes

@see Horde_ActiveSync_Wbxml_Encoder::startTag

boolean $output_empty

@see Horde_ActiveSync_Wbxml_Encoder::startTag

_content()

_content(mixed  $content) 

Outputs data

Parameters

mixed $content

A string or stream resource to write to the output

_endTag()

_endTag() 

Output the endtag

_outByte()

_outByte(\byte  $byte) 

Output a single byte to the stream

Parameters

\byte $byte

The byte to output.

_outMBUInt()

_outMBUInt(  $uint) 

Outputs an MBUInt to the stream

Parameters

$uint

The data to write.

_outTermStr()

_outTermStr(mixed  $content) 

Output a string along with the terminator.

Parameters

mixed $content

A string or a stream resource.

_outAttributes()

_outAttributes() 

Output attributes

_outSwitchPage()

_outSwitchPage(integer  $page) 

Switch code page.

Parameters

integer $page

The code page to switch to.

_getMapping()

_getMapping(string  $tag) : array

Obtain the wbxml mapping for the given tag

Parameters

string $tag

Returns

array

_splitTag()

_splitTag(string  $fulltag) : array

Split a tag into it's atomic parts

Parameters

string $fulltag

The full tag name (e.g. POOMCONTACTS:Email1Address)

Returns

array —

An array containing the namespace and tagname

_logStartTag()

_logStartTag(string  $tag, mixed  $attr, boolean  $output_empty) : void

Log the start tag output

Parameters

string $tag
mixed $attr
boolean $output_empty

_logEndTag()

_logEndTag() : void

Log the endtag output

_logContent()

_logContent(string  $content) : void

Log the content output

Parameters

string $content

The output