PHP Класс Habari\HTMLNode

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$node DomNode

Открытые методы

Метод Описание
__construct ( DOMNode $node ) Constructor for this node
__get ( string $name ) : mixed Get the value of an attribute of this node
__set ( string $name, mixed $value ) Set the value of an attribute on this node
add_class ( string | array $newclass ) Add a class to the class attribute of this node
append_html ( string $html ) Append HTML as a child of this node
get ( ) : string Get this node's string representation
inner_html ( ) : string Get the HTML of all child elements of this node
promote_children ( ) Move the children of this node into this node's parent, just before this node in the DOM tree
remove ( ) Remove this node from the DOM
remove_class ( string | array $removeclass ) Remove a class from this node

Описание методов

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

Constructor for this node
public __construct ( DOMNode $node )
$node DOMNode The actual node we're trying to access

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

Get the value of an attribute of this node
public __get ( string $name ) : mixed
$name string The name of the attribute value to obtain
Результат mixed The value of the attribute

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

Set the value of an attribute on this node
public __set ( string $name, mixed $value )
$name string The name of the attribute to set
$value mixed The value of the parameter

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

Add a class to the class attribute of this node
public add_class ( string | array $newclass )
$newclass string | array The class or classes to add to this node

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

Append HTML as a child of this node
public append_html ( string $html )
$html string The HTML to add, which is subsequently parsed into DOMNodes

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

Get this node's string representation
public get ( ) : string
Результат string The node's string representation

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

Get the HTML of all child elements of this node
public inner_html ( ) : string
Результат string The requested HTML

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

Move the children of this node into this node's parent, just before this node in the DOM tree
public promote_children ( )

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

Remove this node from the DOM
public remove ( )

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

Remove a class from this node
public remove_class ( string | array $removeclass )
$removeclass string | array The class or classes to remove from this node

Описание свойств

$node публичное свойство

public DomNode $node
Результат DomNode