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);
}
}