class DomElements implements IteratorAggregate, ArrayAccess, Countable (View source)

Html Elements collection.

Methods

__construct(array|mixed $elements = array(), boolean $strict = false)

Class init.

string
__toString()

Convert all elements to string.

getIterator()

Retrieve an external iterator

boolean
offsetExists(mixed $offset)

Whether a offset exists

mixed
offsetGet(mixed $offset)

Offset to retrieve

void
offsetSet(mixed $offset, mixed $value)

Offset to set

void
offsetUnset(mixed $offset)

Offset to unset

int
count()

Count elements of an object

boolean
getStrict()

Method to get property Strict

setStrict(boolean $strict)

Method to set property strict

mixed[]|HtmlElement[]
getElements()

Method to get property Elements

setElements(mixed[]|HtmlElement[] $elements)

Method to set property elements

Details

at line line 38
__construct(array|mixed $elements = array(), boolean $strict = false)

Class init.

Parameters

array|mixed $elements
boolean $strict

at line line 54
string __toString()

Convert all elements to string.

Return Value

string

at line line 71
Traversable getIterator()

Retrieve an external iterator

Return Value

Traversable

at line line 83
boolean offsetExists(mixed $offset)

Whether a offset exists

Parameters

mixed $offset An offset to check for.

Return Value

boolean true on success or false on failure.

at line line 95
mixed offsetGet(mixed $offset)

Offset to retrieve

Parameters

mixed $offset The offset to retrieve.

Return Value

mixed Can return all value types.

at line line 113
void offsetSet(mixed $offset, mixed $value)

Offset to set

Parameters

mixed $offset The offset to assign the value to.
mixed $value The value to set.

Return Value

void

at line line 132
void offsetUnset(mixed $offset)

Offset to unset

Parameters

mixed $offset The offset to unset.

Return Value

void

at line line 147
int count()

Count elements of an object

Return Value

int The custom count as an integer.

at line line 157
boolean getStrict()

Method to get property Strict

Return Value

boolean

at line line 169
DomElements setStrict(boolean $strict)

Method to set property strict

Parameters

boolean $strict

Return Value

DomElements Return self to support chaining.

at line line 181
mixed[]|HtmlElement[] getElements()

Method to get property Elements

Return Value

mixed[]|HtmlElement[]

at line line 193
DomElements setElements(mixed[]|HtmlElement[] $elements)

Method to set property elements

Parameters

mixed[]|HtmlElement[] $elements

Return Value

DomElements Return self to support chaining.