BaseData
trait BaseData
Traits
Methods
static CastsRequestInput
castRequestUsing(array $arguments)
Get the request caster for the data object.
from
RequestCastableData
static array|DataCollection|PaginatedDataCollection|CursorPaginatedDataCollection|Enumerable|AbstractPaginator|Paginator|AbstractCursorPaginator|CursorPaginator|LazyCollection|Collection
collect(mixed $items, string|null $into = null)
Collect data objects.
static CreationContextFactory
factory(CreationContext|null $creationContext = null)
Create a fresh data construction factory, optionally with another creation's options.
static array
normalizers()
Get the class-owned data normalizers.
static array
prepareForPipeline(array $properties)
Prepare one normalized payload before its properties are read.
static BaseData
Details
in
RequestCastableData at line 18
static CastsRequestInput
castRequestUsing(array $arguments)
Get the request caster for the data object.
at line 38
static BaseData|null
optional(mixed ...$payloads)
Create an optional data object.
at line 56
static BaseData
from(mixed ...$payloads)
Create a data object.
at line 133
static array|DataCollection|PaginatedDataCollection|CursorPaginatedDataCollection|Enumerable|AbstractPaginator|Paginator|AbstractCursorPaginator|CursorPaginator|LazyCollection|Collection
collect(mixed $items, string|null $into = null)
Collect data objects.
Contract-typed sources retain every possible rebuildable runtime shape.
at line 144
static CreationContextFactory
factory(CreationContext|null $creationContext = null)
Create a fresh data construction factory, optionally with another creation's options.
at line 157
static array
normalizers()
Get the class-owned data normalizers.
at line 168
static array
prepareForPipeline(array $properties)
Prepare one normalized payload before its properties are read.