Documentation

XmlNodeAttributeList
in package
implements IteratorAggregate, Countable, ArrayAccess

XmlNodeAttributeList

This class represents a list of attributes associated with a XML node.

Table of Contents

Interfaces

IteratorAggregate
Countable
ArrayAccess

Properties

$count  : int
$_data  : DOMNamedNodeMap
The list of attributes.
$_document  : DOMDocument
The document.
$_node  : mixed
The node.

Methods

__construct()  : mixed
Constructor
__get()  : XmlAttribute|null
Getter
Append()  : void
Appends an attribute.
Count()  : int
Returns the count of attributes.
getIterator()  : XmlNodeListIterator
Returns an iterator for iteration using foreach.
Item()  : XmlAttribute
Returns the attribute by index.
offsetExists()  : bool
Checks if data exists by index.
offsetGet()  : XmlAttribute
offsetGet()  : mixed
Retrieves the value by index.
offsetSet()  : void
Sets the value by index.
offsetUnset()  : void
Unsets data by index.
Remove()  : void
Removes an attribute by name.

Properties

Methods

__construct()

Constructor

public __construct(DOMDocument $document, DOMNode $node, DOMNamedNodeMap $xmlattributes) : mixed
Parameters
$document : DOMDocument

The document.

$node : DOMNode

The node.

$xmlattributes : DOMNamedNodeMap

The list of attributes.

Append()

Appends an attribute.

public Append(string $name, string $value) : void
Parameters
$name : string

The name of the attribute.

$value : string

The value of the attribute.

Count()

Returns the count of attributes.

public Count() : int
Return values
int

The count of attributes.

offsetExists()

Checks if data exists by index.

public offsetExists(int $offset) : bool
Parameters
$offset : int

The offset.

Return values
bool

Whether the data exists.

offsetGet()

Retrieves the value by index.

public offsetGet(int $offset) : mixed
Parameters
$offset : int

The offset.

Return values
mixed

The value.

offsetSet()

Sets the value by index.

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

The offset.

$value : mixed

The value.

offsetUnset()

Unsets data by index.

public offsetUnset(string $offset) : void
Parameters
$offset : string

The offset.

Remove()

Removes an attribute by name.

public Remove(string $name) : void
Parameters
$name : string

The name of the attribute.


        
On this page

Search results