コード例 #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];
 }