PHPHtmlParser\Dom\Tag::getAttributes PHP Метод

getAttributes() публичный Метод

Returns all attributes of this tag.
public getAttributes ( ) : array
Результат array
    public function getAttributes()
    {
        $return = [];
        foreach ($this->attr as $attr => $info) {
            $return[$attr] = $this->getAttribute($attr);
        }
        return $return;
    }

Usage Example

Пример #1
0
 /**
  * A wrapper method that simply calls the getAttribute method
  * on the tag of this node.
  *
  * @return array
  */
 public function getAttributes()
 {
     $attributes = $this->tag->getAttributes();
     foreach ($attributes as $name => $info) {
         $attributes[$name] = $info['value'];
     }
     return $attributes;
 }