class UList extends AbstractHtmlList (View source)

The UList class.

Methods

__construct(ListItem[] $items = array(), array $attribs = array())

Constructor.

string
toString(boolean $forcePair = false)

toString

string
render(boolean $forcePair = false)

Alias of toString()

string
__toString()

Convert this object to string.

mixed
getContent()

Get content.

setContent(mixed $content)

Set content.

string
getAttribute(string $name, mixed $default = null)

Get attributes.

setAttribute(string $name, string $value)

Set attribute value.

array
getAttributes()

Get all attributes.

setAttributes(array $attribs)

Set all attributes.

string
getName()

Get element tag name.

setName(string $name)

Set element tag name.

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

create(array $attribs = array())

Quick create for PHP 5.3

addItem(ListItem|string $item, array $attribs = array())

addItem

item(string $item, array $attribs = array())

Alias of addItem()

child(string|HtmlElement $title, string|AbstractHtmlList $child, array $attribs = array())

child

setItems(array $items)

setItems

Details

__construct(ListItem[] $items = array(), array $attribs = array())

Constructor.

Parameters

ListItem[] $items
array $attribs Element attributes.

in HtmlElement at line line 27
string toString(boolean $forcePair = false)

toString

Parameters

boolean $forcePair

Return Value

string

in DomElement at line line 79
string render(boolean $forcePair = false)

Alias of toString()

Parameters

boolean $forcePair

Return Value

string

in DomElement at line line 89
string __toString()

Convert this object to string.

Return Value

string

in DomElement at line line 106
mixed getContent()

Get content.

Return Value

mixed

in DomElement at line line 118
DomElement setContent(mixed $content)

Set content.

Parameters

mixed $content Element content.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 133
string getAttribute(string $name, mixed $default = null)

Get attributes.

Parameters

string $name Attribute name.
mixed $default Default value.

Return Value

string The attribute value.

in DomElement at line line 151
DomElement setAttribute(string $name, string $value)

Set attribute value.

Parameters

string $name Attribute name.
string $value The value to set into attribute.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 163
array getAttributes()

Get all attributes.

Return Value

array All attributes.

in DomElement at line line 175
DomElement setAttributes(array $attribs)

Set all attributes.

Parameters

array $attribs All attributes.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 187
string getName()

Get element tag name.

Return Value

string

in DomElement at line line 199
DomElement setName(string $name)

Set element tag name.

Parameters

string $name Set element tag name.

Return Value

DomElement Return self to support chaining.

in DomElement at line line 214
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. The return value will be casted to boolean if non-boolean was returned.

in DomElement at line line 226
mixed offsetGet(mixed $offset)

Offset to retrieve

Parameters

mixed $offset The offset to retrieve.

Return Value

mixed Can return all value types.

in DomElement at line line 244
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

in DomElement at line line 256
void offsetUnset(mixed $offset)

Offset to unset

Parameters

mixed $offset The offset to unset.

Return Value

void

static AbstractHtmlList create(array $attribs = array())

Quick create for PHP 5.3

Parameters

array $attribs

Return Value

AbstractHtmlList

AbstractHtmlList addItem(ListItem|string $item, array $attribs = array())

addItem

Parameters

ListItem|string $item
array $attribs

Return Value

AbstractHtmlList

AbstractHtmlList item(string $item, array $attribs = array())

Alias of addItem()

Parameters

string $item
array $attribs

Return Value

AbstractHtmlList

AbstractHtmlList child(string|HtmlElement $title, string|AbstractHtmlList $child, array $attribs = array())

child

Parameters

string|HtmlElement $title
string|AbstractHtmlList $child
array $attribs

Return Value

AbstractHtmlList

AbstractHtmlList setItems(array $items)

setItems

Parameters

array $items

Return Value

AbstractHtmlList