class Schema implements Schemable

Methods

__construct(Type $schema, string $name = 'schema_definition', bool $strict = false)

Create a new output schema.

string
name()

Get the name of the schema.

withName(string $name)

Create a new output schema with the given name.

array
toArray()

Get the array representation of the schema.

array
toSchema()

Get the array representation of the schema.

Details

at line 15
__construct(Type $schema, string $name = 'schema_definition', bool $strict = false)

Create a new output schema.

Parameters

Type $schema
string $name
bool $strict

at line 25
string name()

Get the name of the schema.

Return Value

string

at line 33
Schema withName(string $name)

Create a new output schema with the given name.

Parameters

string $name

Return Value

Schema

at line 47
array toArray()

Get the array representation of the schema.

Return Value

array

at line 57
array toSchema()

Get the array representation of the schema.

Return Value

array