예제 #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
 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;
 }