Exemple #1
0
 function __construct(TagNode $parent, $qName, $attrs)
 {
     if (strcasecmp($qName, 'img') == 0 && !array_key_exists('src', $attrs)) {
         HTMLDiffer::diffDebug("Image without a source\n");
         parent::__construct($parent, '<' . $qName . '></' . $qName . '>');
     } else {
         parent::__construct($parent, '<' . $qName . '>' . strtolower($attrs['src']) . '</' . $qName . '>');
     }
     $this->qName = strtolower($qName);
     $this->attributes = $attrs;
 }
 function __construct(TagNode $parent, $attrs)
 {
     if (!array_key_exists('src', $attrs)) {
         HTMLDiffer::diffDebug("Image without a source\n");
         parent::__construct($parent, '<img></img>');
     } else {
         parent::__construct($parent, '<img>' . strtolower($attrs['src']) . '</img>');
     }
     $this->attributes = $attrs;
 }