Back to Dagger

Function_

docs/static/reference/php/Dagger/Function_.html

0.20.77.1 KB
Original Source

Function_

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

from AbstractObject

null|array|string|int|float|bool

queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

from AbstractObject

array

args()

Arguments accepted by the function, if any.

string

deprecated()

The reason this function is deprecated, if any.

string

description()

A doc string for the function, if any.

AbstractId

id()

A unique identifier for this Function.

string

name()

The name of the function.

TypeDef

returnType()

The type returned by the function.

SourceMap

sourceMap()

The location of this function declaration.

string

sourceModuleName()

If this function is provided by a module, the name of the module. Unset otherwise.

Function_

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

Returns the function with the provided argument

Function_

withCachePolicy(FunctionCachePolicy $policy, string|null $timeToLive = null)

Returns the function updated to use the provided cache policy.

Function_

withCheck()

Returns the function with a flag indicating it's a check.

Function_

withDeprecated(string|null $reason = null)

Returns the function with the provided deprecation reason.

Function_

withDescription(string $description)

Returns the function with the given doc string.

Function_

withGenerator()

Returns the function with a flag indicating it's a generator.

Function_

withSourceMap(SourceMap $sourceMap)

Returns the function with the given source map.

Function_

withUp()

Returns the function with a flag indicating it returns a service for dagger up.

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 deprecated()

The reason this function is deprecated, if any.

Return Value

| string | |

at line 39 string description()

A doc string for the function, if any.

Return Value

| string | |

at line 48 AbstractId id()

A unique identifier for this Function.

Return Value

| AbstractId | |

at line 57 string name()

The name of the function.

Return Value

| string | |

at line 66 TypeDef returnType()

The type returned by the function.

Return Value

| TypeDef | |

at line 75 SourceMap sourceMap()

The location of this function declaration.

Return Value

| SourceMap | |

at line 84 string sourceModuleName()

If this function is provided by a module, the name of the module. Unset otherwise.

Return Value

| string | |

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

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 | | | string|null | $deprecated | | | string|null | $defaultAddress | |

Return Value

| Function_ | |

at line 134 Function_ withCachePolicy(FunctionCachePolicy $policy, string|null $timeToLive = null)

Returns the function updated to use the provided cache policy.

Parameters

| FunctionCachePolicy | $policy | | | string|null | $timeToLive | |

Return Value

| Function_ | |

at line 147 Function_ withCheck()

Returns the function with a flag indicating it's a check.

Return Value

| Function_ | |

at line 156 Function_ withDeprecated(string|null $reason = null)

Returns the function with the provided deprecation reason.

Parameters

| string|null | $reason | |

Return Value

| Function_ | |

at line 168 Function_ withDescription(string $description)

Returns the function with the given doc string.

Parameters

| string | $description | |

Return Value

| Function_ | |

at line 178 Function_ withGenerator()

Returns the function with a flag indicating it's a generator.

Return Value

| Function_ | |

at line 187 Function_ withSourceMap(SourceMap $sourceMap)

Returns the function with the given source map.

Parameters

| SourceMap | $sourceMap | |

Return Value

| Function_ | |

at line 197 Function_ withUp()

Returns the function with a flag indicating it returns a service for dagger up.

Return Value

| Function_ | |

Generated by Doctum, a API Documentation generator and fork of Sami.