interface Driver

Methods

void
define(string $feature, callable $resolver)

Define an initial feature flag state resolver.

array
defined()

Retrieve the names of all defined features.

array
getAll(array $features)

Get multiple feature flag values.

mixed
get(string $feature, mixed $scope)

Retrieve a feature flag's value.

void
set(string $feature, mixed $scope, mixed $value)

Set a feature flag's value.

void
setForAllScopes(string $feature, mixed $value)

Set a feature flag's value for all scopes.

void
delete(string $feature, mixed $scope)

Delete a feature flag's value.

void
purge(array|null $features)

Purge the given features from storage, or every feature when null is given.

Details

at line 16
void define(string $feature, callable $resolver)

Define an initial feature flag state resolver.

Parameters

string $feature
callable $resolver

Return Value

void

at line 24
array defined()

Retrieve the names of all defined features.

Return Value

array

at line 32
array getAll(array $features)

Get multiple feature flag values.

Parameters

array $features

Return Value

array

at line 37
mixed get(string $feature, mixed $scope)

Retrieve a feature flag's value.

Parameters

string $feature
mixed $scope

Return Value

mixed

at line 42
void set(string $feature, mixed $scope, mixed $value)

Set a feature flag's value.

Parameters

string $feature
mixed $scope
mixed $value

Return Value

void

at line 47
void setForAllScopes(string $feature, mixed $value)

Set a feature flag's value for all scopes.

Parameters

string $feature
mixed $value

Return Value

void

at line 52
void delete(string $feature, mixed $scope)

Delete a feature flag's value.

Parameters

string $feature
mixed $scope

Return Value

void

at line 57
void purge(array|null $features)

Purge the given features from storage, or every feature when null is given.

Parameters

array|null $features

Return Value

void