ArangoOptionsTrait
Resolves the effective `arangodump` / `arangorestore` options by layering, from the lowest to the highest precedence:
binary default (null) → [arango.dump] / [arango.restore] config → CLI
The [arango.dump] and [arango.restore] sections come from config.toml
(see definitions/config.php) and reach the command through the dump /
restore init keys (ArangoCommandParam::DUMP,
ArangoCommandParam::RESTORE). The resolved connection settings and the
curated CLI flags always win over the configured defaults.
The keys of the config sections are the option property names of
ArangoDumpOptions /
ArangoRestoreOptions (e.g. threads,
overwrite, includeSystemCollections). Unknown keys are silently ignored
by the options constructor.
Table of Contents
Properties
- $dumpConfig : array<string|int, mixed>
- The `[arango.dump]` config defaults (option name => value).
- $restoreConfig : array<string|int, mixed>
- The `[arango.restore]` config defaults (option name => value).
Methods
- initializeArangoOptions() : static
- Captures the `[arango.dump]` / `[arango.restore]` config sections from the init array. Non-array values are ignored, leaving the defaults empty.
- resolveDumpOptions() : array<string|int, mixed>
- Layers the explicit dump options over the `[arango.dump]` config defaults, then lets the curated CLI flags override everything.
- resolveRestoreOptions() : array<string|int, mixed>
- Layers the explicit restore options over the `[arango.restore]` config defaults, then lets the curated CLI flags override everything.
- restoreProtectedCollections() : array<int, string>
- The collection names the `restore` action refuses to overwrite unless `--force` is passed, read from the `protected` key of the `[arango.restore]` config section ({@see ArangoCommandParam::PROTECTED}).
Properties
$dumpConfig
The `[arango.dump]` config defaults (option name => value).
protected
array<string|int, mixed>
$dumpConfig
= []
$restoreConfig
The `[arango.restore]` config defaults (option name => value).
protected
array<string|int, mixed>
$restoreConfig
= []
Methods
initializeArangoOptions()
Captures the `[arango.dump]` / `[arango.restore]` config sections from the init array. Non-array values are ignored, leaving the defaults empty.
public
initializeArangoOptions([array<string|int, mixed> $init = [] ]) : static
Parameters
- $init : array<string|int, mixed> = []
Return values
staticresolveDumpOptions()
Layers the explicit dump options over the `[arango.dump]` config defaults, then lets the curated CLI flags override everything.
protected
resolveDumpOptions(array<string|int, mixed> $explicit, InputInterface $input) : array<string|int, mixed>
Parameters
- $explicit : array<string|int, mixed>
-
The options resolved by the action (connection, output directory, collection targeting).
- $input : InputInterface
-
The current console input.
Return values
array<string|int, mixed>resolveRestoreOptions()
Layers the explicit restore options over the `[arango.restore]` config defaults, then lets the curated CLI flags override everything.
protected
resolveRestoreOptions(array<string|int, mixed> $explicit, InputInterface $input) : array<string|int, mixed>
Parameters
- $explicit : array<string|int, mixed>
-
The options resolved by the action (connection, input directory, create flags, collection targeting).
- $input : InputInterface
-
The current console input.
Return values
array<string|int, mixed>restoreProtectedCollections()
The collection names the `restore` action refuses to overwrite unless `--force` is passed, read from the `protected` key of the `[arango.restore]` config section ({@see ArangoCommandParam::PROTECTED}).
protected
restoreProtectedCollections() : array<int, string>
Non-array values and non-string entries are ignored.