PHPackages                             mcaskill/tokenlist - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mcaskill/tokenlist

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

mcaskill/tokenlist
==================

The StringTokenList class represents a set of distinct space-separated tokens.

017PHP

Since Feb 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mcaskill/tokenlist)[ Packagist](https://packagist.org/packages/mcaskill/tokenlist)[ RSS](/packages/mcaskill-tokenlist/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

TokenList
=========

[](#tokenlist)

The **`StringTokenList`** class represents a set of distinct space-separated tokens. It provides the main functionalities of a PHP Array. The main differences are that the `StringTokenList`:

- allows only integers as indexes,
- is always case-sensitive,
- and excludes duplicate values.

The `StringTokenList` class is essentially a PHP implementation of the [`DOMTokenList`](https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList) JavaScript interface.

The class is extended by:

- `DOMTokenList`
    - `DOMClassList`
    - `DOMRelList`

Installation
------------

[](#installation)

### With Composer

[](#with-composer)

```
$ composer require mcaskill/tokenlist

```

```
{
	"require": {
		"mcaskill/tokenlist": "dev-master"
	}
}
```

```
