You are here

function W3Cvalidator_Message::__construct in W3C Validator 7

Constructor for a response message

Parameters

object $node A dom document node.:

File

validators/Message.php, line 61

Class

W3Cvalidator_Message
Simple class for a w3c_validator module Message.

Code

function __construct($node = null) {
  if (isset($node)) {
    foreach (get_class_vars('W3Cvalidator_Message') as $var => $val) {
      $element = $node
        ->getElementsByTagName($var);
      if ($element->length) {
        $this->{$var} = $element
          ->item(0)->nodeValue;
      }
    }
  }
}