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 |
function __construct($output, $log_level = self::LOG_PROTOCOL)
{
parent::__construct($output, $log_level);
/* reverse-map the DTD */
$dtd = array();
foreach ($this->_dtd['namespaces'] as $nsid => $nsname) {
$dtd['namespaces'][$nsname] = $nsid;
}
foreach ($this->_dtd['codes'] as $cp => $value) {
$dtd['codes'][$cp] = array();
foreach ($this->_dtd['codes'][$cp] as $tagid => $tagname) {
$dtd['codes'][$cp][$tagname] = $tagid;
}
}
$this->_dtd = $dtd;
}