yocto/yoclib-wbxml

This yocLibrary enables your project to encode and decode WBXML data in PHP.

Installs: 75

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/yocto/yoclib-wbxml

v1.0.0 2021-02-11 13:46 UTC

This package is auto-updated.

Last update: 2025-10-12 00:41:51 UTC


README

This yocLibrary enables your project to encode and decode WBXML data in PHP.

Status

Build Status

Installation

composer require yocto/yoclib-wbxml

Use

Encoding

use YOCLIB\WBXML\CodePages\ExchangeActiveSync;
use YOCLIB\WBXML\WBXMLEncoder;
use YOCLIB\WBXML\WBXMLException;

$xml = '<FolderSync/>';

$codePages = ExchangeActiveSync::getCodePages();

$encoder = new WBXMLEncoder($codePages);

try{
	$binary = $encoder->encode($xml);
}catch(WBXMLException $e){
	//TODO
}

Decoding

use YOCLIB\WBXML\CodePages\ExchangeActiveSync;
use YOCLIB\WBXML\WBXMLDecoder;
use YOCLIB\WBXML\WBXMLException;

$binary = "\x03\x01\x6a\x00\x00\xff\xff";

$codePages = ExchangeActiveSync::getCodePages();

$decoder = new WBXMLDecoder($codePages);

try{
	$xml = $decoder->decode($binary);
}catch(WBXMLException $e){
	//TODO
}