Represents a set of space-separated attributes of an element attribute.
- property-read int $length The number of tokens.
- property-read string $value A space-separated list of the tokens.
Abstract
Interface
Methods |
public
abstract
add
(
string
$tokens
) Adds the given tokens to the list.
|
public
abstract
contains
(
string
$token
) :
bool
Returns true if the list contains the given token, otherwise false.
|
public
abstract
entries
() :
ArrayIterator
Returns an iterator allowing you to go through all tokens contained in the list.
|
public
abstract
item
(
int
$index
) Returns an item in the list by its index (returns null if the number is greater than or equal to the length of
|
public
abstract
remove
(
string
$tokens
) Removes the specified tokens from the list. If the string does not exist in the list, no error is thrown.
|
public
abstract
replace
(
string
$old
,
string
$new
) Replaces an existing token with a new token.
|
public
abstract
toggle
(
string
$token
,
?
bool
$force
=
NULL
) :
bool
Removes a given token from the list and returns false. If token doesn't exist it's added and the function
|