public function addObject($data, $mimetype = null, $encoding = null)
{
$objNode = $this->createNewSignNode('Object');
$this->sigNode->appendChild($objNode);
if (!empty($mimetype)) {
$objNode->setAttribute('MimeType', $mimetype);
}
if (!empty($encoding)) {
$objNode->setAttribute('Encoding', $encoding);
}
if ($data instanceof DOMElement) {
$newData = $this->sigNode->ownerDocument->importNode($data, true);
} else {
$newData = $this->sigNode->ownerDocument->createTextNode($data);
}
$objNode->appendChild($newData);
return $objNode;
}