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 エンコーディングを使います。 パースをおこなうメソッドは、エンコーディングを自動的に判別し、呼び出し側でエンコーディングを指定することもできます。

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

目次

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top