class Module extends AbstractObject implements IdAble

A Dagger module.

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

check(string $name)

Return the check defined by the module with the given name. Must match to exactly one check.

checks(array|null $include = null)

Return all checks defined by the module

array
dependencies()

The dependencies of the module.

string
description()

The doc string of the module, if any

array
enums()

Enumerations served by this module.

generatedContextDirectory()

The generated files and directories made on top of the module source's context directory.

id()

A unique identifier for this Module.

array
interfaces()

Interfaces served by this module.

introspectionSchemaJSON()

The introspection schema JSON file for this module.

string
name()

The name of the module

array
objects()

Objects served by this module.

runtime()

The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.

sdk()

The SDK config used by this module.

void
serve(bool|null $includeDependencies = null)

Serve a module's API in the current session.

source()

The source for the module.

sync()

Forces evaluation of the module, including any loading into the engine and associated validation.

userDefaults()

User-defined default values, loaded from local .env files.

withDescription(string $description)

Retrieves the module with the given description

withEnum(TypeDef $enum)

This module plus the given Enum type and associated values

withInterface(TypeDef $iface)

This module plus the given Interface type and associated functions

withObject(TypeDef $object)

This module plus the given Object type and associated functions.

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 19
Check check(string $name)

Return the check defined by the module with the given name. Must match to exactly one check.

Parameters

string $name

Return Value

Check

at line 29
CheckGroup checks(array|null $include = null)

Return all checks defined by the module

Parameters

array|null $include

Return Value

CheckGroup

at line 41
array dependencies()

The dependencies of the module.

Return Value

array

at line 50
string description()

The doc string of the module, if any

Return Value

string

at line 59
array enums()

Enumerations served by this module.

Return Value

array

at line 68
Directory generatedContextDirectory()

The generated files and directories made on top of the module source's context directory.

Return Value

Directory

at line 77
AbstractId id()

A unique identifier for this Module.

Return Value

AbstractId

at line 86
array interfaces()

Interfaces served by this module.

Return Value

array

at line 99
File introspectionSchemaJSON()

The introspection schema JSON file for this module.

This file represents the schema visible to the module's source code, including all core types and those from the dependencies.

Note: this is in the context of a module, so some core types may be hidden.

Return Value

File

at line 108
string name()

The name of the module

Return Value

string

at line 117
array objects()

Objects served by this module.

Return Value

array

at line 126
Container runtime()

The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.

Return Value

Container

at line 135
SDKConfig sdk()

The SDK config used by this module.

Return Value

SDKConfig

at line 146
void serve(bool|null $includeDependencies = null)

Serve a module's API in the current session.

Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.

Parameters

bool|null $includeDependencies

Return Value

void

at line 158
ModuleSource source()

The source for the module.

Return Value

ModuleSource

at line 167
ModuleId sync()

Forces evaluation of the module, including any loading into the engine and associated validation.

Return Value

ModuleId

at line 176
EnvFile userDefaults()

User-defined default values, loaded from local .env files.

Return Value

EnvFile

at line 185
Module withDescription(string $description)

Retrieves the module with the given description

Parameters

string $description

Return Value

Module

at line 195
Module withEnum(TypeDef $enum)

This module plus the given Enum type and associated values

Parameters

TypeDef $enum

Return Value

Module

at line 205
Module withInterface(TypeDef $iface)

This module plus the given Interface type and associated functions

Parameters

TypeDef $iface

Return Value

Module

at line 215
Module withObject(TypeDef $object)

This module plus the given Object type and associated functions.

Parameters

TypeDef $object

Return Value

Module