Back to Dagger

ModuleSource

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

0.20.718.8 KB
Original Source

ModuleSource

class ModuleSource extends AbstractObject implements IdAble

The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.

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

Module

asModule()

Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation

string

asString()

A human readable ref string representation of this module source.

ModuleSource

blueprint()

The blueprint referenced by the module source.

string

cloneRef()

The ref to clone the root of the git repo from. Only valid for git sources.

string

commit()

The resolved commit of the git repo this source points to.

array

configClients()

The clients generated for the module.

bool

configExists()

Whether an existing dagger.json for the module was found.

Directory

contextDirectory()

The full directory loaded for the module source, including the source code as a subdirectory.

array

dependencies()

The dependencies of the module source.

string

digest()

A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance.

Directory

directory(string $path)

The directory containing the module configuration and source code (source code may be in a subdir).

string

engineVersion()

The engine version of the module.

Changeset

generatedContextChangeset()

The generated files and directories made on top of the module source's context directory, returned as a Changeset.

Directory

generatedContextDirectory()

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

string

htmlRepoURL()

The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).

string

htmlURL()

The URL to the source's git repo in a web browser. Only valid for git sources.

AbstractId

id()

A unique identifier for this ModuleSource.

File

introspectionSchemaJSON()

The introspection schema JSON file for this module source.

ModuleSourceKind

kind()

The kind of module source (currently local, git or dir).

string

localContextDirectoryPath()

The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources.

string

moduleName()

The name of the module, including any setting via the withName API.

string

moduleOriginalName()

The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).

string

originalSubpath()

The original subpath used when instantiating this module source, relative to the context directory.

string

pin()

The pinned version of this module source.

string

repoRootPath()

The import path corresponding to the root of the git repo this source points to. Only valid for git sources.

SDKConfig

sdk()

The SDK configuration of the module.

string

sourceRootSubpath()

The path, relative to the context directory, that contains the module's dagger.json.

string

sourceSubpath()

The path to the directory containing the module's source code, relative to the context directory.

ModuleSourceId

sync()

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

array

toolchains()

The toolchains referenced by the module source.

EnvFile

userDefaults()

User-defined defaults read from local .env files

string

version()

The specified version of the git repo this source points to.

ModuleSource

withBlueprint(ModuleSource $blueprint)

Set a blueprint for the module source.

ModuleSource

withClient(string $generator, string $outputDir)

Update the module source with a new client to generate.

ModuleSource

withDependencies(array $dependencies)

Append the provided dependencies to the module source's dependency list.

ModuleSource

withEngineVersion(string $version)

Upgrade the engine version of the module to the given value.

ModuleSource

withExperimentalFeatures(array $features)

Enable the experimental features for the module source.

ModuleSource

withIncludes(array $patterns)

Update the module source with additional include patterns for files+directories from its context that are required for building it

ModuleSource

withName(string $name)

Update the module source with a new name.

ModuleSource

withSDK(string $source)

Update the module source with a new SDK.

ModuleSource

withSourceSubpath(string $path)

Update the module source with a new source subpath.

ModuleSource

withToolchains(array $toolchains)

Add toolchains to the module source.

ModuleSource

withUpdateBlueprint()

Update the blueprint module to the latest version.

ModuleSource

withUpdateDependencies(array $dependencies)

Update one or more module dependencies.

ModuleSource

withUpdateToolchains(array $toolchains)

Update one or more toolchains.

ModuleSource

withUpdatedClients(array $clients)

Update one or more clients.

ModuleSource

withoutBlueprint()

Remove the current blueprint from the module source.

ModuleSource

withoutClient(string $path)

Remove a client from the module source.

ModuleSource

withoutDependencies(array $dependencies)

Remove the provided dependencies from the module source's dependency list.

ModuleSource

withoutExperimentalFeatures(array $features)

Disable experimental features for the module source.

ModuleSource

withoutToolchains(array $toolchains)

Remove the provided toolchains from the module source.

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 Module asModule()

Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation

Return Value

| Module | |

at line 28 string asString()

A human readable ref string representation of this module source.

Return Value

| string | |

at line 37 ModuleSource blueprint()

The blueprint referenced by the module source.

Return Value

| ModuleSource | |

at line 46 string cloneRef()

The ref to clone the root of the git repo from. Only valid for git sources.

Return Value

| string | |

at line 55 string commit()

The resolved commit of the git repo this source points to.

Return Value

| string | |

at line 64 array configClients()

The clients generated for the module.

Return Value

| array | |

at line 73 bool configExists()

Whether an existing dagger.json for the module was found.

Return Value

| bool | |

at line 82 Directory contextDirectory()

The full directory loaded for the module source, including the source code as a subdirectory.

Return Value

| Directory | |

at line 91 array dependencies()

The dependencies of the module source.

Return Value

| array | |

at line 100 string digest()

A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance.

Return Value

| string | |

at line 109 Directory directory(string $path)

The directory containing the module configuration and source code (source code may be in a subdir).

Parameters

| string | $path | |

Return Value

| Directory | |

at line 119 string engineVersion()

The engine version of the module.

Return Value

| string | |

at line 128 Changeset generatedContextChangeset()

The generated files and directories made on top of the module source's context directory, returned as a Changeset.

Return Value

| Changeset | |

at line 137 Directory generatedContextDirectory()

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

Return Value

| Directory | |

at line 146 string htmlRepoURL()

The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).

Return Value

| string | |

at line 155 string htmlURL()

The URL to the source's git repo in a web browser. Only valid for git sources.

Return Value

| string | |

at line 164 AbstractId id()

A unique identifier for this ModuleSource.

Return Value

| AbstractId | |

at line 177 File introspectionSchemaJSON()

The introspection schema JSON file for this module source.

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 186 ModuleSourceKind kind()

The kind of module source (currently local, git or dir).

Return Value

| ModuleSourceKind | |

at line 195 string localContextDirectoryPath()

The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources.

Return Value

| string | |

at line 204 string moduleName()

The name of the module, including any setting via the withName API.

Return Value

| string | |

at line 213 string moduleOriginalName()

The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).

Return Value

| string | |

at line 222 string originalSubpath()

The original subpath used when instantiating this module source, relative to the context directory.

Return Value

| string | |

at line 231 string pin()

The pinned version of this module source.

Return Value

| string | |

at line 240 string repoRootPath()

The import path corresponding to the root of the git repo this source points to. Only valid for git sources.

Return Value

| string | |

at line 249 SDKConfig sdk()

The SDK configuration of the module.

Return Value

| SDKConfig | |

at line 258 string sourceRootSubpath()

The path, relative to the context directory, that contains the module's dagger.json.

Return Value

| string | |

at line 267 string sourceSubpath()

The path to the directory containing the module's source code, relative to the context directory.

Return Value

| string | |

at line 276 ModuleSourceId sync()

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

Return Value

| ModuleSourceId | |

at line 285 array toolchains()

The toolchains referenced by the module source.

Return Value

| array | |

at line 294 EnvFile userDefaults()

User-defined defaults read from local .env files

Return Value

| EnvFile | |

at line 303 string version()

The specified version of the git repo this source points to.

Return Value

| string | |

at line 312 ModuleSource withBlueprint(ModuleSource $blueprint)

Set a blueprint for the module source.

Parameters

| ModuleSource | $blueprint | |

Return Value

| ModuleSource | |

at line 322 ModuleSource withClient(string $generator, string $outputDir)

Update the module source with a new client to generate.

Parameters

| string | $generator | | | string | $outputDir | |

Return Value

| ModuleSource | |

at line 333 ModuleSource withDependencies(array $dependencies)

Append the provided dependencies to the module source's dependency list.

Parameters

| array | $dependencies | |

Return Value

| ModuleSource | |

at line 343 ModuleSource withEngineVersion(string $version)

Upgrade the engine version of the module to the given value.

Parameters

| string | $version | |

Return Value

| ModuleSource | |

at line 353 ModuleSource withExperimentalFeatures(array $features)

Enable the experimental features for the module source.

Parameters

| array | $features | |

Return Value

| ModuleSource | |

at line 363 ModuleSource withIncludes(array $patterns)

Update the module source with additional include patterns for files+directories from its context that are required for building it

Parameters

| array | $patterns | |

Return Value

| ModuleSource | |

at line 373 ModuleSource withName(string $name)

Update the module source with a new name.

Parameters

| string | $name | |

Return Value

| ModuleSource | |

at line 383 ModuleSource withSDK(string $source)

Update the module source with a new SDK.

Parameters

| string | $source | |

Return Value

| ModuleSource | |

at line 393 ModuleSource withSourceSubpath(string $path)

Update the module source with a new source subpath.

Parameters

| string | $path | |

Return Value

| ModuleSource | |

at line 403 ModuleSource withToolchains(array $toolchains)

Add toolchains to the module source.

Parameters

| array | $toolchains | |

Return Value

| ModuleSource | |

at line 413 ModuleSource withUpdateBlueprint()

Update the blueprint module to the latest version.

Return Value

| ModuleSource | |

at line 422 ModuleSource withUpdateDependencies(array $dependencies)

Update one or more module dependencies.

Parameters

| array | $dependencies | |

Return Value

| ModuleSource | |

at line 432 ModuleSource withUpdateToolchains(array $toolchains)

Update one or more toolchains.

Parameters

| array | $toolchains | |

Return Value

| ModuleSource | |

at line 442 ModuleSource withUpdatedClients(array $clients)

Update one or more clients.

Parameters

| array | $clients | |

Return Value

| ModuleSource | |

at line 452 ModuleSource withoutBlueprint()

Remove the current blueprint from the module source.

Return Value

| ModuleSource | |

at line 461 ModuleSource withoutClient(string $path)

Remove a client from the module source.

Parameters

| string | $path | |

Return Value

| ModuleSource | |

at line 471 ModuleSource withoutDependencies(array $dependencies)

Remove the provided dependencies from the module source's dependency list.

Parameters

| array | $dependencies | |

Return Value

| ModuleSource | |

at line 481 ModuleSource withoutExperimentalFeatures(array $features)

Disable experimental features for the module source.

Parameters

| array | $features | |

Return Value

| ModuleSource | |

at line 491 ModuleSource withoutToolchains(array $toolchains)

Remove the provided toolchains from the module source.

Parameters

| array | $toolchains | |

Return Value

| ModuleSource | |

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