| @@ 61-77 (lines=17) @@ | ||
| 58 | * |
|
| 59 | * @return string[]|null |
|
| 60 | */ |
|
| 61 | public function getAllAttributes() |
|
| 62 | { |
|
| 63 | if ( |
|
| 64 | $this->node |
|
| 65 | && |
|
| 66 | $this->node->hasAttributes() |
|
| 67 | ) { |
|
| 68 | $attributes = []; |
|
| 69 | foreach ($this->node->attributes ?? [] as $attr) { |
|
| 70 | $attributes[$attr->name] = HtmlDomParser::putReplacedBackToPreserveHtmlEntities($attr->value); |
|
| 71 | } |
|
| 72 | ||
| 73 | return $attributes; |
|
| 74 | } |
|
| 75 | ||
| 76 | return null; |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * @return bool |
|
| @@ 61-77 (lines=17) @@ | ||
| 58 | * |
|
| 59 | * @return string[]|null |
|
| 60 | */ |
|
| 61 | public function getAllAttributes() |
|
| 62 | { |
|
| 63 | if ( |
|
| 64 | $this->node |
|
| 65 | && |
|
| 66 | $this->node->hasAttributes() |
|
| 67 | ) { |
|
| 68 | $attributes = []; |
|
| 69 | foreach ($this->node->attributes ?? [] as $attr) { |
|
| 70 | $attributes[$attr->name] = XmlDomParser::putReplacedBackToPreserveHtmlEntities($attr->value); |
|
| 71 | } |
|
| 72 | ||
| 73 | return $attributes; |
|
| 74 | } |
|
| 75 | ||
| 76 | return null; |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * @return bool |
|