コード例 #1
0
ファイル: Node.php プロジェクト: ivansky/php-dom-query
 public function setAttribute(Attribute &$attr)
 {
     $name = $attr->getName();
     if (isset($this->attributes[$name])) {
         $this->attributes[$name]->updateValue($attr);
     } else {
         $this->attributes[$name] = clone $attr;
     }
     return $this->attributes[$name];
 }
コード例 #2
0
ファイル: Attribute.php プロジェクト: ivansky/php-dom-query
 public function updateValue(Attribute &$attr)
 {
     $this->value = $attr->getValue();
 }