diff options
Diffstat (limited to 'src/model/entities/Node.php')
-rw-r--r-- | src/model/entities/Node.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/model/entities/Node.php b/src/model/entities/Node.php index 711eb3e..c4d0830 100644 --- a/src/model/entities/Node.php +++ b/src/model/entities/Node.php | |||
@@ -98,13 +98,15 @@ class Node | |||
98 | { | 98 | { |
99 | $this->attributes = self::$default_attributes; | 99 | $this->attributes = self::$default_attributes; |
100 | } | 100 | } |
101 | /*public function addAttribute(string $key, string $value): void | 101 | public function addAttribute(string $key, string $value): void |
102 | { | 102 | { |
103 | if(!isset($this->attributes[$key])) { // sécurité $key inexistante | 103 | if(!isset($this->attributes[$key])) { // sécurité $key inexistante |
104 | $this->attributes[$key] = []; | 104 | $this->attributes[$key] = []; |
105 | } | 105 | } |
106 | $this->attributes[$key][] = $value; | 106 | if(!in_array($value, $this->attributes[$key])){ |
107 | }*/ | 107 | $this->attributes[$key][] = $value; |
108 | } | ||
109 | } | ||
108 | /*public function removeAttribute(string $key, string $value): void | 110 | /*public function removeAttribute(string $key, string $value): void |
109 | { | 111 | { |
110 | if(isset($this->attributes[$key])) // sécurité $key inexistante | 112 | if(isset($this->attributes[$key])) // sécurité $key inexistante |