class Function_ extends AbstractObject implements IdAble

Function represents a resolver provided by a Module.

A function always evaluates against a parent object and is given a set of named arguments.

Properties

$lastQuery from  AbstractObject

Methods

__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

array
args()

Arguments accepted by the function, if any.

string
description()

A doc string for the function, if any.

id()

A unique identifier for this Function.

string
name()

The name of the function.

returnType()

The type returned by the function.

sourceMap()

The location of this function declaration.

withArg(string $name, TypeDef $typeDef, string|null $description = '', Json|null $defaultValue = null, string|null $defaultPath = '', array|null $ignore = null, SourceMap|null $sourceMap = null)

Returns the function with the provided argument

withDescription(string $description)

Returns the function with the given doc string.

withSourceMap(SourceMap $sourceMap)

Returns the function with the given source map.

Details

in AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

Parameters

AbstractClient $client
QueryBuilderChain $queryBuilderChain

in AbstractObject at line 19
protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

Parameters

QueryBuilder $leafQueryBuilder
string $leafKey

Return Value

null|array|string|int|float|bool

at line 21
array args()

Arguments accepted by the function, if any.

Return Value

array

at line 30
string description()

A doc string for the function, if any.

Return Value

string

at line 39
AbstractId id()

A unique identifier for this Function.

Return Value

AbstractId

at line 48
string name()

The name of the function.

Return Value

string

at line 57
TypeDef returnType()

The type returned by the function.

Return Value

TypeDef

at line 66
SourceMap sourceMap()

The location of this function declaration.

Return Value

SourceMap

at line 75
Function_ withArg(string $name, TypeDef $typeDef, string|null $description = '', Json|null $defaultValue = null, string|null $defaultPath = '', array|null $ignore = null, SourceMap|null $sourceMap = null)

Returns the function with the provided argument

Parameters

string $name
TypeDef $typeDef
string|null $description
Json|null $defaultValue
string|null $defaultPath
array|null $ignore
SourceMap|null $sourceMap

Return Value

Function_

at line 108
Function_ withDescription(string $description)

Returns the function with the given doc string.

Parameters

string $description

Return Value

Function_

at line 118
Function_ withSourceMap(SourceMap $sourceMap)

Returns the function with the given source map.

Parameters

SourceMap $sourceMap

Return Value

Function_