PHP Class Horde_ActiveSync_Wbxml_Encoder, horde

Author: Michael J Rubinsky ([email protected])
Inheritance: extends Horde_ActiveSync_Wbxml
显示文件 Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$multipart boolean Flag to indicate if we are outputing multipart binary data during e.g., ITEMOPERATION requests.

Protected Properties

Property Type Description
$_parts array Collection of parts to send in MULTIPART responses.
$_tempStream resource Private stream when handling multipart output

Public Methods

Method Description
__construct ( stream $output, integer $log_level = self::LOG_PROTOCOL ) : Horde_ActiveSync_Wbxml_Encoder Const'r
addPart ( mixed $data ) Add a mulitpart part to be output.
content ( mixed $content ) Output the tag content
endTag ( ) Output the end tag
getParts ( ) : array Return the parts array.
outputWbxmlHeader ( ) Output the Wbxml header to the output stream.
startTag ( string $tag, mixed $attributes = false, boolean $output_empty = false ) Start output for the specified tag
startWBXML ( boolean $multipart = false ) Starts the wbxml output.

Private Methods

Method Description
_content ( mixed $content ) Outputs data
_endTag ( ) Output the endtag
_getMapping ( string $tag ) : array Obtain the wbxml mapping for the given tag
_logContent ( string $content ) : void Log the content output
_logEndTag ( ) : void Log the endtag output
_logStartTag ( string $tag, mixed $attr, boolean $output_empty ) : void Log the start tag output
_outAttributes ( ) Output attributes
_outByte ( byte $byte ) Output a single byte to the stream
_outMBUInt ( $uint ) Outputs an MBUInt to the stream
_outSwitchPage ( integer $page ) Switch code page.
_outTermStr ( mixed $content ) Output a string along with the terminator.
_outputStack ( ) Output any tags on the stack that haven't been output yet
_splitTag ( string $fulltag ) : array Split a tag into it's atomic parts
_startTag ( string $tag, mixed $attributes = false, boolean $output_empty = false ) Actually outputs the start tag

Method Details

__construct() public method

Const'r
public __construct ( stream $output, integer $log_level = self::LOG_PROTOCOL ) : Horde_ActiveSync_Wbxml_Encoder
$output stream The output stream
$log_level integer The logging level
return Horde_ActiveSync_Wbxml_Encoder

addPart() public method

Add a mulitpart part to be output.
public addPart ( mixed $data )
$data mixed The part data. A string or stream resource.

content() public method

Output the tag content
public content ( mixed $content )
$content mixed The value to output for this tag. A string or a stream resource.

endTag() public method

Output the end tag
public endTag ( )

getParts() public method

Return the parts array.
public getParts ( ) : array
return array

outputWbxmlHeader() public method

Output the Wbxml header to the output stream.
public outputWbxmlHeader ( )

startTag() public method

Start output for the specified tag
public startTag ( string $tag, mixed $attributes = false, boolean $output_empty = false )
$tag string The name of the tag to start
$attributes mixed Any attributes for the start tag
$output_empty boolean Force output of empty tags

startWBXML() public method

Starts the wbxml output.
public startWBXML ( boolean $multipart = false )
$multipart boolean Indicates we need to output mulitpart binary binary data. See MS-ASCMD 2.2.1.8.1

Property Details

$_parts protected_oe property

Collection of parts to send in MULTIPART responses.
protected array $_parts
return array

$_tempStream protected_oe property

Private stream when handling multipart output
protected resource $_tempStream
return resource

$multipart public_oe property

Flag to indicate if we are outputing multipart binary data during e.g., ITEMOPERATION requests.
public bool $multipart
return boolean