Back to Dagger

Workspace

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

0.21.06.4 KB
Original Source

Workspace

class Workspace extends AbstractObject implements IdAble

A Dagger workspace detected from the current working directory.

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

string

address()

Canonical Dagger address of the workspace directory.

CheckGroup

checks(array|null $include = null, bool|null $noGenerate = null)

Return all checks from modules loaded in the workspace.

string

clientId()

The client ID that owns this workspace's host filesystem.

string

configPath()

Path to config.toml relative to the workspace boundary (empty if not initialized).

Directory

directory(string $path, array|null $exclude = null, array|null $include = null, bool|null $gitignore = false)

Returns a Directory from the workspace.

File

file(string $path)

Returns a File from the workspace.

string

findUp(string $name, string|null $from = '.')

Search for a file or directory by walking up from the start path within the workspace.

GeneratorGroup

generators(array|null $include = null)

Return all generators from modules loaded in the workspace.

bool

hasConfig()

Whether a config.toml file exists in the workspace.

AbstractId

id()

A unique identifier for this Workspace.

bool

initialized()

Whether .dagger/config.toml exists.

string

path()

Workspace directory path relative to the workspace boundary.

UpGroup

services(array|null $include = null)

Return all services from modules loaded in the workspace.

Changeset

update()

Refresh workspace-managed state and return the resulting changeset.

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 string address()

Canonical Dagger address of the workspace directory.

Return Value

| string | |

at line 28 CheckGroup checks(array|null $include = null, bool|null $noGenerate = null)

Return all checks from modules loaded in the workspace.

Parameters

| array|null | $include | | | bool|null | $noGenerate | |

Return Value

| CheckGroup | |

at line 43 string clientId()

The client ID that owns this workspace's host filesystem.

Return Value

| string | |

at line 52 string configPath()

Path to config.toml relative to the workspace boundary (empty if not initialized).

Return Value

| string | |

at line 63 Directory directory(string $path, array|null $exclude = null, array|null $include = null, bool|null $gitignore = false)

Returns a Directory from the workspace.

Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.

Parameters

| string | $path | | | array|null | $exclude | | | array|null | $include | | | bool|null | $gitignore | |

Return Value

| Directory | |

at line 88 File file(string $path)

Returns a File from the workspace.

Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.

Parameters

| string | $path | |

Return Value

| File | |

at line 104 string findUp(string $name, string|null $from = '.')

Search for a file or directory by walking up from the start path within the workspace.

Returns the absolute workspace path if found, or null if not found.

Relative start paths resolve from the workspace directory.

The search stops at the workspace boundary and will not traverse above it.

Parameters

| string | $name | | | string|null | $from | |

Return Value

| string | |

at line 117 GeneratorGroup generators(array|null $include = null)

Return all generators from modules loaded in the workspace.

Parameters

| array|null | $include | |

Return Value

| GeneratorGroup | |

at line 129 bool hasConfig()

Whether a config.toml file exists in the workspace.

Return Value

| bool | |

at line 138 AbstractId id()

A unique identifier for this Workspace.

Return Value

| AbstractId | |

at line 147 bool initialized()

Whether .dagger/config.toml exists.

Return Value

| bool | |

at line 156 string path()

Workspace directory path relative to the workspace boundary.

Return Value

| string | |

at line 165 UpGroup services(array|null $include = null)

Return all services from modules loaded in the workspace.

Parameters

| array|null | $include | |

Return Value

| UpGroup | |

at line 179 Changeset update()

Refresh workspace-managed state and return the resulting changeset.

Currently this refreshes existing lockfile entries only.

Return Value

| Changeset | |

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