docs/static/reference/php/Dagger/Client.html
class Client extends AbstractClient implements IdAble
The root of the DAG.
| protected AbstractClient | $client | | from AbstractClient | | protected Client | $graphQlClient | | from AbstractClient |
__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain())
No description
from AbstractClient
Results
runQuery(Query $query)
No description
from AbstractClient
null|array|string|int|float|bool
queryLeaf(Query $query, string $leafKey)
No description
from AbstractClient
address(string $value)
initialize an address to load directories, containers, secrets or other object types.
cacheVolume(string $key)
Constructs a cache volume for a given cache key.
Creates an empty changeset
cloud()
Dagger Cloud configuration and state
codegen(ModuleSource $modSource, File $introspectionJson)
No description
codegenBase(ModuleSource $modSource, File $introspectionJson)
No description
container(Platform|null $platform = null)
Creates a scratch container, with no image or metadata.
Returns the current environment
The FunctionCall context that the SDK caller is currently executing in.
The module currently being served in the session, if any.
array
currentTypeDefs(bool|null $hideCore = null)
The TypeDef representations of the objects currently being served in the session.
Detect and return the current workspace.
The default platform of the engine.
Creates an empty directory.
engine()
The Dagger engine container configuration and state
env(bool|null $privileged = false, bool|null $writable = false)
Initializes a new environment
envFile(bool|null $expand = null)
Initialize an environment file
error(string $message)
Create a new error.
file(string $name, string $contents, int|null $permissions = 420)
Creates a file with the specified contents.
function(string $name, TypeDef $returnType)
Creates a function.
generatedCode(Directory $code)
Create a code generation result, given a directory containing the generated code.
git(string $url, bool|null $keepGitDir = true, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null, string|null $httpAuthUsername = '', Secret|null $httpAuthToken = null, Secret|null $httpAuthHeader = null, Service|null $experimentalServiceHost = null)
Queries a Git repository.
host()
Queries the host environment.
http(string $url, string|null $name = null, int|null $permissions = null, Secret|null $authHeader = null, Service|null $experimentalServiceHost = null)
Returns a file containing an http remote url content.
id()
A unique identifier for this Query.
json()
Initialize a JSON value
llm(string|null $model = null, int|null $maxAPICalls = null)
Initialize a Large Language Model (LLM)
loadAddressFromID(Address $id)
Load a Address from its ID.
loadBindingFromID(Binding $id)
Load a Binding from its ID.
loadCacheVolumeFromID(CacheVolume $id)
Load a CacheVolume from its ID.
loadChangesetFromID(Changeset $id)
Load a Changeset from its ID.
loadCheckFromID(Check $id)
Load a Check from its ID.
loadCheckGroupFromID(CheckGroup $id)
Load a CheckGroup from its ID.
loadCloudFromID(Cloud $id)
Load a Cloud from its ID.
loadContainerFromID(Container $id)
Load a Container from its ID.
loadCurrentModuleFromID(CurrentModule $id)
Load a CurrentModule from its ID.
loadDiffStatFromID(DiffStat $id)
Load a DiffStat from its ID.
loadDirectoryFromID(Directory $id)
Load a Directory from its ID.
loadEngineCacheEntryFromID(EngineCacheEntry $id)
Load a EngineCacheEntry from its ID.
loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)
Load a EngineCacheEntrySet from its ID.
loadEngineCacheFromID(EngineCache $id)
Load a EngineCache from its ID.
loadEngineFromID(Engine $id)
Load a Engine from its ID.
loadEnumTypeDefFromID(EnumTypeDef $id)
Load a EnumTypeDef from its ID.
loadEnumValueTypeDefFromID(EnumValueTypeDef $id)
Load a EnumValueTypeDef from its ID.
loadEnvFileFromID(EnvFile $id)
Load a EnvFile from its ID.
loadEnvFromID(Env $id)
Load a Env from its ID.
loadEnvVariableFromID(EnvVariable $id)
Load a EnvVariable from its ID.
loadErrorFromID(Error $id)
Load a Error from its ID.
loadErrorValueFromID(ErrorValue $id)
Load a ErrorValue from its ID.
loadFieldTypeDefFromID(FieldTypeDef $id)
Load a FieldTypeDef from its ID.
loadFileFromID(File $id)
Load a File from its ID.
loadFunctionArgFromID(FunctionArg $id)
Load a FunctionArg from its ID.
loadFunctionCallArgValueFromID(FunctionCallArgValue $id)
Load a FunctionCallArgValue from its ID.
loadFunctionCallFromID(FunctionCall $id)
Load a FunctionCall from its ID.
loadFunctionFromID(Function_ $id)
Load a Function from its ID.
loadGeneratedCodeFromID(GeneratedCode $id)
Load a GeneratedCode from its ID.
loadGeneratorFromID(Generator $id)
Load a Generator from its ID.
loadGeneratorGroupFromID(GeneratorGroup $id)
Load a GeneratorGroup from its ID.
loadGitRefFromID(GitRef $id)
Load a GitRef from its ID.
loadGitRepositoryFromID(GitRepository $id)
Load a GitRepository from its ID.
loadHealthcheckConfigFromID(HealthcheckConfig $id)
Load a HealthcheckConfig from its ID.
loadHostFromID(Host $id)
Load a Host from its ID.
loadInputTypeDefFromID(InputTypeDef $id)
Load a InputTypeDef from its ID.
loadInterfaceTypeDefFromID(InterfaceTypeDef $id)
Load a InterfaceTypeDef from its ID.
loadJSONValueFromID(JsonValue $id)
Load a JSONValue from its ID.
loadLLMFromID(LLM $id)
Load a LLM from its ID.
loadLLMTokenUsageFromID(LLMTokenUsage $id)
Load a LLMTokenUsage from its ID.
loadLabelFromID(Label $id)
Load a Label from its ID.
loadListTypeDefFromID(ListTypeDef $id)
Load a ListTypeDef from its ID.
loadModuleConfigClientFromID(ModuleConfigClient $id)
Load a ModuleConfigClient from its ID.
loadModuleFromID(Module $id)
Load a Module from its ID.
loadModuleSourceFromID(ModuleSource $id)
Load a ModuleSource from its ID.
loadObjectTypeDefFromID(ObjectTypeDef $id)
Load a ObjectTypeDef from its ID.
loadPhpSdkFromID(PhpSdk $id)
Load a PhpSdk from its ID.
loadPortFromID(Port $id)
Load a Port from its ID.
loadQueryFromID(Query $id)
Load a Query from its ID.
loadSDKConfigFromID(SDKConfig $id)
Load a SDKConfig from its ID.
loadScalarTypeDefFromID(ScalarTypeDef $id)
Load a ScalarTypeDef from its ID.
loadSearchResultFromID(SearchResult $id)
Load a SearchResult from its ID.
loadSearchSubmatchFromID(SearchSubmatch $id)
Load a SearchSubmatch from its ID.
loadSecretFromID(Secret $id)
Load a Secret from its ID.
loadServiceFromID(Service $id)
Load a Service from its ID.
loadSocketFromID(Socket $id)
Load a Socket from its ID.
loadSourceMapFromID(SourceMap $id)
Load a SourceMap from its ID.
loadStatFromID(Stat $id)
Load a Stat from its ID.
loadTerminalFromID(Terminal $id)
Load a Terminal from its ID.
loadTypeDefFromID(TypeDef $id)
Load a TypeDef from its ID.
loadUpFromID(Up $id)
Load a Up from its ID.
loadUpGroupFromID(UpGroup $id)
Load a UpGroup from its ID.
loadWorkspaceFromID(Workspace $id)
Load a Workspace from its ID.
module()
Create a new module.
moduleRuntime(ModuleSource $modSource, File $introspectionJson)
No description
moduleSource(string $refString, string|null $refPin = '', bool|null $disableFindUp = false, bool|null $allowNotExists = false, ModuleSourceKind|null $requireKind = null)
Create a new module source instance from a source ref string
secret(string $uri, string|null $cacheKey = null)
Creates a new secret.
setSecret(string $name, string $plaintext)
Sets a secret given a user defined name to its plaintext and returns the secret.
No description
sourceMap(string $filename, int $line, int $column)
Creates source map metadata.
typeDef()
Create a new TypeDef.
string
version()
Get the current Dagger Engine version.
with(Directory|null $sdkSourceDir = null)
Configure the php-sdk constructor arguments.
__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain()) No description
| Client | $clientOrConnection | | | QueryBuilderChain | $queryBuilderChain | |
Results runQuery(Query $query)No description
| Query | $query | |
| Results | |
null|array|string|int|float|bool queryLeaf(Query $query, string $leafKey)No description
| Query | $query | | | string | $leafKey | |
| null|array|string|int|float|bool | |
Address address(string $value)initialize an address to load directories, containers, secrets or other object types.
| string | $value | |
| Address | |
CacheVolume cacheVolume(string $key)Constructs a cache volume for a given cache key.
| string | $key | |
| CacheVolume | |
Changeset changeset()Creates an empty changeset
| Changeset | |
Cloud cloud()Dagger Cloud configuration and state
| Cloud | |
GeneratedCode codegen(ModuleSource $modSource, File $introspectionJson)No description
| ModuleSource | $modSource | | | File | $introspectionJson | |
| GeneratedCode | |
Container codegenBase(ModuleSource $modSource, File $introspectionJson)No description
| ModuleSource | $modSource | | | File | $introspectionJson | |
| Container | |
Container container(Platform|null $platform = null)Creates a scratch container, with no image or metadata.
To pull an image, follow up with the "from" function.
| Platform|null | $platform | |
| Container | |
Env currentEnv()Returns the current environment
When called from a function invoked via an LLM tool call, this will be the LLM's current environment, including any modifications made through calling tools. Env values returned by functions become the new environment for subsequent calls, and Changeset values returned by functions are applied to the environment's workspace.
When called from a module function outside of an LLM, this returns an Env with the current module installed, and with the current module's source directory as its workspace.
| Env | |
FunctionCall currentFunctionCall()The FunctionCall context that the SDK caller is currently executing in.
If the caller is not currently executing in a function, this will return an error.
| FunctionCall | |
CurrentModule currentModule()The module currently being served in the session, if any.
| CurrentModule | |
array currentTypeDefs(bool|null $hideCore = null)The TypeDef representations of the objects currently being served in the session.
| bool|null | $hideCore | |
| array | |
Workspace currentWorkspace()Detect and return the current workspace.
| Workspace | |
Platform defaultPlatform()The default platform of the engine.
| Platform | |
Directory directory()Creates an empty directory.
| Directory | |
Engine engine()The Dagger engine container configuration and state
| Engine | |
Env env(bool|null $privileged = false, bool|null $writable = false)Initializes a new environment
| bool|null | $privileged | | | bool|null | $writable | |
| Env | |
EnvFile envFile(bool|null $expand = null)Initialize an environment file
| bool|null | $expand | |
| EnvFile | |
Error error(string $message)Create a new error.
| string | $message | |
| Error | |
File file(string $name, string $contents, int|null $permissions = 420)Creates a file with the specified contents.
| string | $name | | | string | $contents | | | int|null | $permissions | |
| File | |
Function_ function(string $name, TypeDef $returnType)Creates a function.
| string | $name | | | TypeDef | $returnType | |
| Function_ | |
GeneratedCode generatedCode(Directory $code)Create a code generation result, given a directory containing the generated code.
| Directory | $code | |
| GeneratedCode | |
GitRepository git(string $url, bool|null $keepGitDir = true, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null, string|null $httpAuthUsername = '', Secret|null $httpAuthToken = null, Secret|null $httpAuthHeader = null, Service|null $experimentalServiceHost = null)Queries a Git repository.
| string | $url | | | bool|null | $keepGitDir | | | string|null | $sshKnownHosts | | | Socket|null | $sshAuthSocket | | | string|null | $httpAuthUsername | | | Secret|null | $httpAuthToken | | | Secret|null | $httpAuthHeader | | | Service|null | $experimentalServiceHost | |
| GitRepository | |
Host host()Queries the host environment.
| Host | |
File http(string $url, string|null $name = null, int|null $permissions = null, Secret|null $authHeader = null, Service|null $experimentalServiceHost = null)Returns a file containing an http remote url content.
| string | $url | | | string|null | $name | | | int|null | $permissions | | | Secret|null | $authHeader | | | Service|null | $experimentalServiceHost | |
| File | |
AbstractId id()A unique identifier for this Query.
| AbstractId | |
JsonValue json()Initialize a JSON value
| JsonValue | |
LLM llm(string|null $model = null, int|null $maxAPICalls = null)Initialize a Large Language Model (LLM)
| string|null | $model | | | int|null | $maxAPICalls | |
| LLM | |
Address loadAddressFromID(Address $id)Load a Address from its ID.
| Address | $id | |
| Address | |
Binding loadBindingFromID(Binding $id)Load a Binding from its ID.
| Binding | $id | |
| Binding | |
CacheVolume loadCacheVolumeFromID(CacheVolume $id)Load a CacheVolume from its ID.
| CacheVolume | $id | |
| CacheVolume | |
Changeset loadChangesetFromID(Changeset $id)Load a Changeset from its ID.
| Changeset | $id | |
| Changeset | |
Check loadCheckFromID(Check $id)Load a Check from its ID.
| Check | $id | |
| Check | |
CheckGroup loadCheckGroupFromID(CheckGroup $id)Load a CheckGroup from its ID.
| CheckGroup | $id | |
| CheckGroup | |
Cloud loadCloudFromID(Cloud $id)Load a Cloud from its ID.
| Cloud | $id | |
| Cloud | |
Container loadContainerFromID(Container $id)Load a Container from its ID.
| Container | $id | |
| Container | |
CurrentModule loadCurrentModuleFromID(CurrentModule $id)Load a CurrentModule from its ID.
| CurrentModule | $id | |
| CurrentModule | |
DiffStat loadDiffStatFromID(DiffStat $id)Load a DiffStat from its ID.
| DiffStat | $id | |
| DiffStat | |
Directory loadDirectoryFromID(Directory $id)Load a Directory from its ID.
| Directory | $id | |
| Directory | |
EngineCacheEntry loadEngineCacheEntryFromID(EngineCacheEntry $id)Load a EngineCacheEntry from its ID.
| EngineCacheEntry | $id | |
| EngineCacheEntry | |
EngineCacheEntrySet loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)Load a EngineCacheEntrySet from its ID.
| EngineCacheEntrySet | $id | |
| EngineCacheEntrySet | |
EngineCache loadEngineCacheFromID(EngineCache $id)Load a EngineCache from its ID.
| EngineCache | $id | |
| EngineCache | |
Engine loadEngineFromID(Engine $id)Load a Engine from its ID.
| Engine | $id | |
| Engine | |
EnumTypeDef loadEnumTypeDefFromID(EnumTypeDef $id)Load a EnumTypeDef from its ID.
| EnumTypeDef | $id | |
| EnumTypeDef | |
EnumValueTypeDef loadEnumValueTypeDefFromID(EnumValueTypeDef $id)Load a EnumValueTypeDef from its ID.
| EnumValueTypeDef | $id | |
| EnumValueTypeDef | |
EnvFile loadEnvFileFromID(EnvFile $id)Load a EnvFile from its ID.
| EnvFile | $id | |
| EnvFile | |
Env loadEnvFromID(Env $id)Load a Env from its ID.
| Env | $id | |
| Env | |
EnvVariable loadEnvVariableFromID(EnvVariable $id)Load a EnvVariable from its ID.
| EnvVariable | $id | |
| EnvVariable | |
Error loadErrorFromID(Error $id)Load a Error from its ID.
| Error | $id | |
| Error | |
ErrorValue loadErrorValueFromID(ErrorValue $id)Load a ErrorValue from its ID.
| ErrorValue | $id | |
| ErrorValue | |
FieldTypeDef loadFieldTypeDefFromID(FieldTypeDef $id)Load a FieldTypeDef from its ID.
| FieldTypeDef | $id | |
| FieldTypeDef | |
File loadFileFromID(File $id)Load a File from its ID.
| File | $id | |
| File | |
FunctionArg loadFunctionArgFromID(FunctionArg $id)Load a FunctionArg from its ID.
| FunctionArg | $id | |
| FunctionArg | |
FunctionCallArgValue loadFunctionCallArgValueFromID(FunctionCallArgValue $id)Load a FunctionCallArgValue from its ID.
| FunctionCallArgValue | $id | |
| FunctionCallArgValue | |
FunctionCall loadFunctionCallFromID(FunctionCall $id)Load a FunctionCall from its ID.
| FunctionCall | $id | |
| FunctionCall | |
Function_ loadFunctionFromID(Function_ $id)Load a Function from its ID.
| Function_ | $id | |
| Function_ | |
GeneratedCode loadGeneratedCodeFromID(GeneratedCode $id)Load a GeneratedCode from its ID.
| GeneratedCode | $id | |
| GeneratedCode | |
Generator loadGeneratorFromID(Generator $id)Load a Generator from its ID.
| Generator | $id | |
| Generator | |
GeneratorGroup loadGeneratorGroupFromID(GeneratorGroup $id)Load a GeneratorGroup from its ID.
| GeneratorGroup | $id | |
| GeneratorGroup | |
GitRef loadGitRefFromID(GitRef $id)Load a GitRef from its ID.
| GitRef | $id | |
| GitRef | |
GitRepository loadGitRepositoryFromID(GitRepository $id)Load a GitRepository from its ID.
| GitRepository | $id | |
| GitRepository | |
HealthcheckConfig loadHealthcheckConfigFromID(HealthcheckConfig $id)Load a HealthcheckConfig from its ID.
| HealthcheckConfig | $id | |
| HealthcheckConfig | |
Host loadHostFromID(Host $id)Load a Host from its ID.
| Host | $id | |
| Host | |
InputTypeDef loadInputTypeDefFromID(InputTypeDef $id)Load a InputTypeDef from its ID.
| InputTypeDef | $id | |
| InputTypeDef | |
InterfaceTypeDef loadInterfaceTypeDefFromID(InterfaceTypeDef $id)Load a InterfaceTypeDef from its ID.
| InterfaceTypeDef | $id | |
| InterfaceTypeDef | |
JsonValue loadJSONValueFromID(JsonValue $id)Load a JSONValue from its ID.
| JsonValue | $id | |
| JsonValue | |
LLM loadLLMFromID(LLM $id)Load a LLM from its ID.
| LLM | $id | |
| LLM | |
LLMTokenUsage loadLLMTokenUsageFromID(LLMTokenUsage $id)Load a LLMTokenUsage from its ID.
| LLMTokenUsage | $id | |
| LLMTokenUsage | |
Label loadLabelFromID(Label $id)Load a Label from its ID.
| Label | $id | |
| Label | |
ListTypeDef loadListTypeDefFromID(ListTypeDef $id)Load a ListTypeDef from its ID.
| ListTypeDef | $id | |
| ListTypeDef | |
ModuleConfigClient loadModuleConfigClientFromID(ModuleConfigClient $id)Load a ModuleConfigClient from its ID.
| ModuleConfigClient | $id | |
| ModuleConfigClient | |
Module loadModuleFromID(Module $id)Load a Module from its ID.
| Module | $id | |
| Module | |
ModuleSource loadModuleSourceFromID(ModuleSource $id)Load a ModuleSource from its ID.
| ModuleSource | $id | |
| ModuleSource | |
ObjectTypeDef loadObjectTypeDefFromID(ObjectTypeDef $id)Load a ObjectTypeDef from its ID.
| ObjectTypeDef | $id | |
| ObjectTypeDef | |
PhpSdk loadPhpSdkFromID(PhpSdk $id)Load a PhpSdk from its ID.
| PhpSdk | $id | |
| PhpSdk | |
Port loadPortFromID(Port $id)Load a Port from its ID.
| Port | $id | |
| Port | |
Client loadQueryFromID(Query $id)Load a Query from its ID.
| Query | $id | |
| Client | |
SDKConfig loadSDKConfigFromID(SDKConfig $id)Load a SDKConfig from its ID.
| SDKConfig | $id | |
| SDKConfig | |
ScalarTypeDef loadScalarTypeDefFromID(ScalarTypeDef $id)Load a ScalarTypeDef from its ID.
| ScalarTypeDef | $id | |
| ScalarTypeDef | |
SearchResult loadSearchResultFromID(SearchResult $id)Load a SearchResult from its ID.
| SearchResult | $id | |
| SearchResult | |
SearchSubmatch loadSearchSubmatchFromID(SearchSubmatch $id)Load a SearchSubmatch from its ID.
| SearchSubmatch | $id | |
| SearchSubmatch | |
Secret loadSecretFromID(Secret $id)Load a Secret from its ID.
| Secret | $id | |
| Secret | |
Service loadServiceFromID(Service $id)Load a Service from its ID.
| Service | $id | |
| Service | |
Socket loadSocketFromID(Socket $id)Load a Socket from its ID.
| Socket | $id | |
| Socket | |
SourceMap loadSourceMapFromID(SourceMap $id)Load a SourceMap from its ID.
| SourceMap | $id | |
| SourceMap | |
Stat loadStatFromID(Stat $id)Load a Stat from its ID.
| Stat | $id | |
| Stat | |
Terminal loadTerminalFromID(Terminal $id)Load a Terminal from its ID.
| Terminal | $id | |
| Terminal | |
TypeDef loadTypeDefFromID(TypeDef $id)Load a TypeDef from its ID.
| TypeDef | $id | |
| TypeDef | |
Up loadUpFromID(Up $id)Load a Up from its ID.
| Up | $id | |
| Up | |
UpGroup loadUpGroupFromID(UpGroup $id)Load a UpGroup from its ID.
| UpGroup | $id | |
| UpGroup | |
Workspace loadWorkspaceFromID(Workspace $id)Load a Workspace from its ID.
| Workspace | $id | |
| Workspace | |
Module module()Create a new module.
| Module | |
Container moduleRuntime(ModuleSource $modSource, File $introspectionJson)No description
| ModuleSource | $modSource | | | File | $introspectionJson | |
| Container | |
ModuleSource moduleSource(string $refString, string|null $refPin = '', bool|null $disableFindUp = false, bool|null $allowNotExists = false, ModuleSourceKind|null $requireKind = null)Create a new module source instance from a source ref string
| string | $refString | | | string|null | $refPin | | | bool|null | $disableFindUp | | | bool|null | $allowNotExists | | | ModuleSourceKind|null | $requireKind | |
| ModuleSource | |
Secret secret(string $uri, string|null $cacheKey = null)Creates a new secret.
| string | $uri | | | string|null | $cacheKey | |
| Secret | |
Secret setSecret(string $name, string $plaintext)Sets a secret given a user defined name to its plaintext and returns the secret.
The plaintext value is limited to a size of 128000 bytes.
| string | $name | | | string | $plaintext | |
| Secret | |
Directory sourceDir()No description
| Directory | |
SourceMap sourceMap(string $filename, int $line, int $column)Creates source map metadata.
| string | $filename | | | int | $line | | | int | $column | |
| SourceMap | |
TypeDef typeDef()Create a new TypeDef.
| TypeDef | |
string version()Get the current Dagger Engine version.
| string | |
Client with(Directory|null $sdkSourceDir = null)Configure the php-sdk constructor arguments.
| Directory|null | $sdkSourceDir | |
| Client | |
Generated by Doctum, a API Documentation generator and fork of Sami.