PHP 클래스 Horde_ActiveSync_Wbxml_Decoder, horde

저자: Michael J Rubinsky ([email protected])
상속: extends Horde_ActiveSync_Wbxml
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$charsetid
$publicid
$publicstringid
$stringtable
$version integer Store the wbxml version value. Used to verify we have a valid wbxml input stream.

보호된 프로퍼티들

프로퍼티 타입 설명
$_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

공개 메소드들

메소드 설명
_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.

보호된 메소드들

메소드 설명
_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

메소드 상세

_getAttributes() 보호된 메소드

Get the element attributes
protected _getAttributes ( ) : mixed
리턴 mixed The value of the element's attributes.

_getByte() 보호된 메소드

Fetch a single byte from the stream.
protected _getByte ( ) : string
리턴 string The single byte.

_getMBUInt() 보호된 메소드

Get an MBU integer
protected _getMBUInt ( ) : integer
리턴 integer

_getMapping() 보호된 메소드

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

_getOpaque() 보호된 메소드

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.
리턴 string A string of bytes representing the opaque value.

_getStringTable() 보호된 메소드

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

_getStringTableEntry() 보호된 메소드

..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??
리턴 string

_getTempStream() 보호된 메소드

Return the temporary buffer stream.
protected _getTempStream ( ) : stream
리턴 stream

_getTermStr() 보호된 메소드

Get a null terminated string from the stream.
protected _getTermStr ( ) : string
리턴 string The string

_getToken() 보호된 메소드

Get the next start tag, content or end tag
protected _getToken ( ) : array
리턴 array The element array.

_logToken() 보호된 메소드

Log the token.
protected _logToken ( $el ) : void
리턴 void

_readVersion() 보호된 메소드

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

_splitAttribute() 보호된 메소드

Parses an attribute string
protected _splitAttribute ( string $attr ) : array
$attr string The raw attribute value.
리턴 array The attribute hash

_ungetElement() 공개 메소드

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.
리턴 void

getElement() 공개 메소드

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

getElementContent() 공개 메소드

Get the element contents
public getElementContent ( ) : mixed
리턴 mixed The content of the current element | false on failure.

getElementEndTag() 공개 메소드

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

getElementStartTag() 공개 메소드

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.
리턴 array | boolean The start tag array | false on failure.

getFullInputStream() 공개 메소드

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
리턴 resource

getLastStartElement() 공개 메소드

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

getToken() 공개 메소드

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

isEmptyElement() 공개 메소드

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

isWbxml() 공개 메소드

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
리턴 boolean

peek() 공개 메소드

Peek at the next element in the stream.
public peek ( ) : array
리턴 array The next element in the stream.

readWbxmlHeader() 공개 메소드

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

프로퍼티 상세

$_attrcp 보호되어 있는 프로퍼티

protected $_attrcp

$_buffer 보호되어 있는 프로퍼티

Temporary string buffer
protected stream $_buffer
리턴 stream

$_isWbxml 보호되어 있는 프로퍼티

Flag to indicate we have a valid wbxml input stream
protected bool $_isWbxml
리턴 boolean

$_lastStartElement 보호되어 있는 프로퍼티

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
리턴 array

$_readHeader 보호되어 있는 프로퍼티

protected $_readHeader

$_ungetbuffer 보호되어 있는 프로퍼티

protected $_ungetbuffer

$charsetid 공개적으로 프로퍼티

public $charsetid

$publicid 공개적으로 프로퍼티

public $publicid

$publicstringid 공개적으로 프로퍼티

public $publicstringid

$stringtable 공개적으로 프로퍼티

public $stringtable

$version 공개적으로 프로퍼티

Store the wbxml version value. Used to verify we have a valid wbxml input stream.
public int $version
리턴 integer