PHP 클래스 Horde_SyncMl_XmlOutput, horde

Each member public function creates one type of SyncML artefact (like a Status response). Currently some of the information is retrieved from state. Maybe remove these dependencies (by providing the data as parameter) for an even cleaner implementation. The Horde_SyncMl_XmlOutput class takes automatically care of creating a unique CmdID for each command created. Copyright 2006-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.
저자: Karsten Fourmont ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$output The outputhandler to whom the XML is passed: like Horde_Xml_Wbxml_Encoder

보호된 프로퍼티들

프로퍼티 타입 설명
$_msg_CmdID The CmdID provides a unique ID for each command in a syncml packet.
$_uri

공개 메소드들

메소드 설명
getOutput ( ) The final output as procuded by the _output Encoder. Either an XML string or a WBXML string.
getOutputSize ( ) The length of the output as produced by the Encoder. To limit the size of individual messages.
init ( &$theoutputhandler )
isWBXML ( ) To we create wbxml or not?
outputAlert ( $alertCode, $clientDB = '', $serverDB = '', $lastAnchor = '', $nextAnchor = '' )
outputBodyStart ( )
outputDevInf ( $cmdRef )
outputEnd ( )
outputFinal ( )
outputGetDevInf ( )
outputHeader ( string $respURI ) Creates a SyncHdr output.
outputInit ( )
outputStatus ( $cmdRef, $cmd, $data, $targetRef = '', $sourceRef = '', $syncAnchorNext = '', $syncAnchorLast = '' )
outputSyncCommand ( string $command, string $content = null, string $contentType = null, string $encodingType = null, string $cuid = null, string $suid = null, integer $contentSize = null, boolean $moreData = false ) : integer Creates a single Sync command
outputSyncEnd ( )
outputSyncStart ( $clientLocURI, $serverLocURI, $numberOfChanges = null )
singleton ( )

보호된 메소드들

메소드 설명
_outputCmdID ( ) internal helper functions:
_singleEle ( $tag, $str, $uri = null ) Output a single $str element.
_writeDataStore ( string $sourceref, string $mimetype, string $version, Horde_Xml_Wbxml_ContentHandler &$output, array $additionaltypes = [] ) Writes DevInf data for one DataStore.

메소드 상세

_outputCmdID() 보호된 메소드

internal helper functions:
protected _outputCmdID ( )

_singleEle() 보호된 메소드

Output a single $str element.
protected _singleEle ( $tag, $str, $uri = null )

_writeDataStore() 보호된 메소드

Writes DevInf data for one DataStore.
protected _writeDataStore ( string $sourceref, string $mimetype, string $version, Horde_Xml_Wbxml_ContentHandler &$output, array $additionaltypes = [] )
$sourceref string Data for element.
$mimetype string Data for and .
$version string Data for and .
$output Horde_Xml_Wbxml_ContentHandler Content handler that will received the output.
$additionaltypes array Array of additional types for and ; format array('text/directory' => '3.0')

getOutput() 공개 메소드

The final output as procuded by the _output Encoder. Either an XML string or a WBXML string.
public getOutput ( )

getOutputSize() 공개 메소드

The length of the output as produced by the Encoder. To limit the size of individual messages.
public getOutputSize ( )

init() 공개 메소드

public init ( &$theoutputhandler )

isWBXML() 공개 메소드

To we create wbxml or not?
public isWBXML ( )

outputAlert() 공개 메소드

public outputAlert ( $alertCode, $clientDB = '', $serverDB = '', $lastAnchor = '', $nextAnchor = '' )

outputBodyStart() 공개 메소드

public outputBodyStart ( )

outputDevInf() 공개 메소드

public outputDevInf ( $cmdRef )

outputEnd() 공개 메소드

public outputEnd ( )

outputFinal() 공개 메소드

public outputFinal ( )

outputGetDevInf() 공개 메소드

public outputGetDevInf ( )

outputHeader() 공개 메소드

Required data is retrieved from state.
public outputHeader ( string $respURI )
$respURI string The url of the server endpoint.

outputInit() 공개 메소드

public outputInit ( )

outputStatus() 공개 메소드

public outputStatus ( $cmdRef, $cmd, $data, $targetRef = '', $sourceRef = '', $syncAnchorNext = '', $syncAnchorLast = '' )

outputSyncCommand() 공개 메소드

Creates a single Sync command
public outputSyncCommand ( string $command, string $content = null, string $contentType = null, string $encodingType = null, string $cuid = null, string $suid = null, integer $contentSize = null, boolean $moreData = false ) : integer
$command string The Sync command (Add, Delete, Replace).
$content string The actual object content.
$contentType string The content's MIME type.
$encodingType string The content encoding of the object.
$cuid string The client's object UID.
$suid string The server's object UID.
$contentSize integer The total content size.
$moreData boolean Add MoreData tag when splitting messages.
리턴 integer The CmdID used for this command.

outputSyncEnd() 공개 메소드

public outputSyncEnd ( )

outputSyncStart() 공개 메소드

public outputSyncStart ( $clientLocURI, $serverLocURI, $numberOfChanges = null )

singleton() 공개 메소드

public singleton ( )

프로퍼티 상세

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

The CmdID provides a unique ID for each command in a syncml packet.
protected $_msg_CmdID

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

protected $_uri

$output 공개적으로 프로퍼티

The outputhandler to whom the XML is passed: like Horde_Xml_Wbxml_Encoder
public $output