コード例 #1
0
ファイル: Nodes.php プロジェクト: kotow/work
 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;
 }
コード例 #2
0
ファイル: Nodes.php プロジェクト: original-brownbear/htmldiff
 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;
 }