| 1 |
<?php |
| 2 |
|
| 3 |
// AUTOMATICALLY GENERATED. DO NOT EDIT. |
| 4 |
// Use `composer build` to regenerate. |
| 5 |
|
| 6 |
namespace Wikimedia\IDLeDOM; |
| 7 |
|
| 8 |
/** |
| 9 |
* DOMTokenList |
| 10 |
* |
| 11 |
* @see https://dom.spec.whatwg.org/#interface-domtokenlist |
| 12 |
* |
| 13 |
* @property int $length |
| 14 |
* @property string $value |
| 15 |
* @phan-forbid-undeclared-magic-properties |
| 16 |
*/ |
| 17 |
interface DOMTokenList extends \ArrayAccess, \IteratorAggregate, \Countable { |
| 18 |
/** |
| 19 |
* @return int |
| 20 |
*/ |
| 21 |
public function getLength(): int; |
| 22 |
|
| 23 |
/** |
| 24 |
* @param int $index |
| 25 |
* @return ?string |
| 26 |
*/ |
| 27 |
public function item( int $index ): ?string; |
| 28 |
|
| 29 |
/** |
| 30 |
* @param string $token |
| 31 |
* @return bool |
| 32 |
*/ |
| 33 |
public function contains( string $token ): bool; |
| 34 |
|
| 35 |
/** |
| 36 |
* @param string ...$tokens |
| 37 |
* @return void |
| 38 |
*/ |
| 39 |
public function add( string ...$tokens ): void; |
| 40 |
|
| 41 |
/** |
| 42 |
* @param string ...$tokens |
| 43 |
* @return void |
| 44 |
*/ |
| 45 |
public function remove( string ...$tokens ): void; |
| 46 |
|
| 47 |
/** |
| 48 |
* @param string $token |
| 49 |
* @param ?bool $force |
| 50 |
* @return bool |
| 51 |
*/ |
| 52 |
public function toggle( string $token, ?bool $force = null ): bool; |
| 53 |
|
| 54 |
/** |
| 55 |
* @param string $token |
| 56 |
* @param string $newToken |
| 57 |
* @return bool |
| 58 |
*/ |
| 59 |
public function replace( string $token, string $newToken ): bool; |
| 60 |
|
| 61 |
/** |
| 62 |
* @param string $token |
| 63 |
* @return bool |
| 64 |
*/ |
| 65 |
public function supports( string $token ): bool; |
| 66 |
|
| 67 |
/** |
| 68 |
* @return string |
| 69 |
*/ |
| 70 |
public function getValue(): string; |
| 71 |
|
| 72 |
/** |
| 73 |
* @param string $val |
| 74 |
*/ |
| 75 |
public function setValue( string $val ): void; |
| 76 |
|
| 77 |
/** |
| 78 |
* @return \Iterator<string> Value iterator returning string items |
| 79 |
*/ |
| 80 |
public function getIterator(): \Iterator; |
| 81 |
|
| 82 |
} |