Bånder

LaravelDataToSchema extends TypeToSchemaExtension
in package

Table of Contents

Methods

reference()  : Reference
Set a reference to that object in the return.
shouldHandle()  : bool
We establish that we handle here all the Spatie\LaravelData\Data classes.
toSchema()  : Type|null
convertReflected()  : Type
Given a pure reflected PHP type, we return the corresponding Scramble type equivalent before Generator conversion.
handleBuiltin()  : Type
handleUnionType()  : Type

Methods

reference()

Set a reference to that object in the return.

public reference(ObjectType $type) : Reference
Parameters
$type : ObjectType
Return values
Reference

shouldHandle()

We establish that we handle here all the Spatie\LaravelData\Data classes.

public shouldHandle(Type $type) : bool

This is because it is a pro feature of scramble and we do not have that kind of money.

Parameters
$type : Type
Return values
bool

toSchema()

public toSchema(Type $type) : Type|null
Parameters
$type : Type

the type being transformed to schema

Return values
Type|null

convertReflected()

Given a pure reflected PHP type, we return the corresponding Scramble type equivalent before Generator conversion.

private convertReflected(ReflectionNamedType|ReflectionUnionType|ReflectionType|null $type) : Type
Parameters
$type : ReflectionNamedType|ReflectionUnionType|ReflectionType|null
Tags
throws
InvalidArgumentException
Return values
Type

handleBuiltin()

private handleBuiltin(string $type) : Type
Parameters
$type : string
Return values
Type

handleUnionType()

private handleUnionType(ReflectionUnionType $union) : Type
Parameters
$union : ReflectionUnionType
Return values
Type

        
On this page

Search results