Horde_ActiveSync_Wbxml_Encoder::_startTag PHP Method

_startTag() private method

Actually outputs the start tag
private _startTag ( string $tag, mixed $attributes = false, boolean $output_empty = false )
$tag string @see Horde_ActiveSync_Wbxml_Encoder::startTag
$attributes mixed @see Horde_ActiveSync_Wbxml_Encoder::startTag
$output_empty boolean @see Horde_ActiveSync_Wbxml_Encoder::startTag
    private function _startTag($tag, $attributes = false, $output_empty = false)
    {
        $this->_logStartTag($tag, $attributes, $output_empty);
        $mapping = $this->_getMapping($tag);
        if (!$mapping) {
            return false;
        }
        /* Make sure we don't need to switch code pages */
        if ($this->_tagcp != $mapping['cp']) {
            $this->_outSwitchPage($mapping['cp']);
            $this->_tagcp = $mapping['cp'];
        }
        /* Build and send the code */
        $code = $mapping['code'];
        if (isset($attributes) && is_array($attributes) && count($attributes) > 0) {
            $code |= 0x80;
        } elseif (!$output_empty) {
            $code |= 0x40;
        }
        $this->_outByte($code);
        if ($code & 0x80) {
            $this->_outAttributes($attributes);
        }
    }