EnvFile
class EnvFile extends AbstractObject implements IdAble, Node
A collection of environment variables.
Properties
| $lastQuery | from AbstractObject |
Methods
No description
Check if a variable exists
Lookup a variable (last occurrence wins) and return its value, or an empty string
Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MYAPP" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello
Return all variables
Add a variable
Remove all occurrences of the named variable
Details
in
AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)
No description
in
AbstractObject at line 19
protected null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)
No description
at line 19
File
asFile()
Return as a file
at line 28
bool
exists(string $name)
Check if a variable exists
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
at line 51
Id
id()
A unique identifier for this EnvFile.
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 "MYAPP" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello
at line 70
array
variables(bool|null $raw = null)
Return all variables
at line 82
EnvFile
withVariable(string $name, string $value)
Add a variable
at line 93
EnvFile
withoutVariable(string $name)
Remove all occurrences of the named variable