Primitive
abstract class Primitive implements Arrayable
Traits
Properties
| static protected array<string, null|list<object>|object> | $attributeCache | from ReadsAttributes | |
| protected null|array<string, mixed> | $meta | from HasMeta | |
| protected string | $name | ||
| protected string | $title | ||
| protected string | $description |
Methods
Resolve the nearest matching attribute in the class hierarchy.
Resolve all matching attributes in the class hierarchy.
Set response metadata using an array or key-value pair.
Get the primitive name.
Get the primitive title.
Get the primitive description.
Get the primitive metadata.
Get the primitive icons.
Merge the resolved icons into the primitive array.
Determine whether the primitive may be registered for this request.
Convert the primitive to its method call representation.
Convert the primitive to an array.
Details
in
ReadsAttributes at line 24
protected mixed
resolveAttribute(string $attributeClass)
Resolve the nearest matching attribute in the class hierarchy.
in
ReadsAttributes at line 56
protected array
resolveAttributes(string $attributeClass)
Resolve all matching attributes in the class hierarchy.
in
ReadsAttributes at line 82
static void
flushState()
Flush all static state.
in
HasIcons at line 19
array
resolvedIcons()
Resolve icons from attributes and the primitive's icons method.
in
HasMeta at line 21
void
setMeta(array|string $meta, mixed $value = null)
Set response metadata using an array or key-value pair.
in
HasMeta at line 46
array
mergeMeta(array $baseArray)
Merge metadata into the given response array.
at line 34
string
name()
Get the primitive name.
at line 44
string
title()
Get the primitive title.
at line 54
string
description()
Get the primitive description.
at line 66
array|null
meta()
Get the primitive metadata.
at line 76
array
icons()
Get the primitive icons.
at line 89
protected array
mergeIcons(array $baseArray)
Merge the resolved icons into the primitive array.
at line 103
bool
eligibleForRegistration()
Determine whether the primitive may be registered for this request.
at line 117
abstract array
toMethodCall()
Convert the primitive to its method call representation.
at line 124
abstract array
toArray()
Convert the primitive to an array.