« Dom\Text::splitText
Dom\TokenList::add »

Dom\TokenList クラス

(PHP 8 >= 8.4.0)

はじめに

属性 (例: クラス名) 中のトークンの集合の表します。

クラス概要

final class Dom\TokenList implements IteratorAggregate, Countable {
/* プロパティ */
public readonly int $length;
public string $value;
/* メソッド */
public function add(string ...$tokens): void
public function contains(string $token): bool
public function count(): int
public function getIterator(): Iterator
public function item(int $index): ?string
public function remove(string ...$tokens): void
public function replace(string $token, string $newToken): bool
public function supports(string $token): bool
public function toggle(string $token, ?bool $force = null): bool
}

プロパティ

length

トークンの数

value

このオブジェクトにリンクされた属性の値

注意

注意:

DOM拡張モジュールは、メソッドやプロパティで UTF-8 エンコーディングを使います。 パースをおこなうメソッドは、エンコーディングを自動的に判別し、呼び出し側でエンコーディングを指定することもできます。

注意:

リスト中のトークンは、配列の記法でアクセスできます

目次

関連キーワード:
TokenList   トークン   token   プロパティ   エンコーディング   属性   length   tokens   contains   count   getIterator   item   remove   replace   supports   toggle   Text   splitText   集合   概要   final   implements   IteratorAggregate   Countable   readonly
関連する関数・ページ:
dom-tokenlist.count   dom-tokenlist.supports   dom-tokenlist.remove   dom-tokenlist.replace   dom-tokenlist.add   dom-tokenlist.getiterator