The Dom\TokenList class
(PHP 8 >= 8.4.0)
简介
Represents a set of tokens in an attribute (e.g. class names).
类摘要
/* 属性 */
/* 方法 */
}属性
lengthThe number of tokens.
valueThe value of the attribute linked to this object.
注释
注意:
此 DOM 扩展在处理方法或属性时使用 UTF-8 编码。 解析器方法会自动检测编码,或允许调用者指定编码。
注意:
Tokens in the list can be accessed by array syntax.
目录
- Dom\TokenList::add — Adds the given tokens to the list
- Dom\TokenList::contains — Returns whether the list contains a given token
- Dom\TokenList::count — Returns the number of tokens in the list
- Dom\TokenList::getIterator — Returns an iterator over the token list
- Dom\TokenList::item — Returns a token from the list
- Dom\TokenList::remove — Removes the given tokens from the list
- Dom\TokenList::replace — Replaces a token in the list with another one
- Dom\TokenList::supports — Returns whether the given token is supported
- Dom\TokenList::toggle — Toggles the presence of a token in the list
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
