3 namespace RemexHtml\Tokenizer;
6 * Interface for attributes emitted by the tokenizer
8 interface Attributes extends \ArrayAccess, \IteratorAggregate {
10 * Get the attributes as a key/value array
11 * @return string[string]
16 * Get the attributes as an array of Attribute objects
17 * @return Attribute[string]
19 function getObjects();
22 * Get the number of attributes. This may include duplicates, and so may
23 * be larger than count( $this->getValues() ). Including duplicates
24 * gives us an efficient way to distinguish zero attributes from non-zero
25 * but is not compliant with the spec, which states that duplicate
26 * attributes must be removed.
33 * Add any attributes in the argument to $this, but if an attribute of the
34 * same name already exists, do not overwrite it.
36 * @param Attributes $other
38 function merge( Attributes $other );