Back to Dagger

EnvFile

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

0.20.74.2 KB
Original Source

EnvFile

class EnvFile extends AbstractObject implements IdAble

A collection of environment variables.

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

File

asFile()

Return as a file

bool

exists(string $name)

Check if a variable exists

string

get(string $name, bool|null $raw = null)

Lookup a variable (last occurrence wins) and return its value, or an empty string

AbstractId

id()

A unique identifier for this EnvFile.

EnvFile

namespace(string $prefix)

Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello

array

variables(bool|null $raw = null)

Return all variables

EnvFile

withVariable(string $name, string $value)

Add a variable

EnvFile

withoutVariable(string $name)

Remove all occurrences of the named variable

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 File asFile()

Return as a file

Return Value

| File | |

at line 28 bool exists(string $name)

Check if a variable exists

Parameters

| string | $name | |

Return Value

| bool | |

at line 38 string get(string $name, bool|null $raw = null)

Lookup a variable (last occurrence wins) and return its value, or an empty string

Parameters

| string | $name | | | bool|null | $raw | |

Return Value

| string | |

at line 51 AbstractId id()

A unique identifier for this EnvFile.

Return Value

| AbstractId | |

at line 60 EnvFile namespace(string $prefix)

Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello

Parameters

| string | $prefix | |

Return Value

| EnvFile | |

at line 70 array variables(bool|null $raw = null)

Return all variables

Parameters

| bool|null | $raw | |

Return Value

| array | |

at line 82 EnvFile withVariable(string $name, string $value)

Add a variable

Parameters

| string | $name | | | string | $value | |

Return Value

| EnvFile | |

at line 93 EnvFile withoutVariable(string $name)

Remove all occurrences of the named variable

Parameters

| string | $name | |

Return Value

| EnvFile | |

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