private function isNodeValidated($node)
{
if ($this->messageValidated) {
// This message was validated externally
return TRUE;
}
if ($this->validator === NULL) {
return FALSE;
}
// Convert the node to a DOM node if it is an element from SimpleXML
if ($node instanceof SimpleXMLElement) {
$node = dom_import_simplexml($node);
}
assert('$node instanceof DOMNode');
return $this->validator->isNodeValidated($node);
}