HeadData
class HeadData implements Transient
Normalized head state: a collection of tag builders with layer semantics.
Properties
| protected TagBuilder> | $builders |
Methods
Get all tag builders.
Get an existing tag builder.
Resolve a mutable tag builder instance, creating and storing it on first use.
Overlay the given builder onto any existing builder of the same type.
Determine whether the head data has no tags.
Mark all builders as belonging to the defaults layer.
Details
at line 23
array
builders()
Get all tag builders.
at line 33
TagBuilder|null
get(string $builder)
Get an existing tag builder.
at line 46
TagBuilder
builder(string $class)
Resolve a mutable tag builder instance, creating and storing it on first use.
at line 55
HeadData
overlayBuilder(TagBuilder $builder)
Overlay the given builder onto any existing builder of the same type.
at line 80
bool
isEmpty()
Determine whether the head data has no tags.
at line 94
HeadData
asDefaults()
Mark all builders as belonging to the defaults layer.
at line 108
HeadData
replicate()
Copy the data and its builders for independent coroutine state.