class MirroredParameters implements Countable

Constants

ANNOTATION

PREFIX

protected TOKEN

Methods

__construct(Collection $parameters)

Create a set of mirrored parameters.

none()

Create an empty set of mirrored parameters.

fromSchema(array $inputSchema)

Parse and validate mirrored parameters in a tool schema.

array
headers(array $arguments)

Build the mirrored headers for the tool arguments.

all()

Get all mirrored parameters.

int
count()

Count the mirrored parameters.

static array
parse(array $schema, SchemaPath $path)

Parse annotations on statically reachable schema properties.

parameter(array $schema, SchemaPath $path)

Validate an annotated property and create its header mapping.

static bool
containsAnnotation(array $schema)

Determine whether a schema branch contains a header annotation.

Details

at line 25
protected __construct(Collection $parameters)

Create a set of mirrored parameters.

Parameters

Collection $parameters

at line 32
static MirroredParameters none()

Create an empty set of mirrored parameters.

Return Value

MirroredParameters

at line 44
static MirroredParameters fromSchema(array $inputSchema)

Parse and validate mirrored parameters in a tool schema.

Parameters

array $inputSchema

Return Value

MirroredParameters

Exceptions

MirroredParameterException

at line 69
array headers(array $arguments)

Build the mirrored headers for the tool arguments.

Parameters

array $arguments

Return Value

array

Exceptions

MirroredParameterException

at line 89
Collection all()

Get all mirrored parameters.

Return Value

Collection

at line 97
int count()

Count the mirrored parameters.

Return Value

int

at line 110
static protected array parse(array $schema, SchemaPath $path)

Parse annotations on statically reachable schema properties.

Parameters

array $schema
SchemaPath $path

Return Value

array

Exceptions

MirroredParameterException

at line 162
static protected MirroredParameter parameter(array $schema, SchemaPath $path)

Validate an annotated property and create its header mapping.

Parameters

array $schema
SchemaPath $path

Return Value

MirroredParameter

Exceptions

MirroredParameterException

at line 188
static protected bool containsAnnotation(array $schema)

Determine whether a schema branch contains a header annotation.

Parameters

array $schema

Return Value

bool