Esc
API Index — Namespaces, Packages, Reports, Indices
StoreBackendKind
: string
in package
Type-safe enum for the Store backend kind.
Store::defaultBackend() accepts BOTH this enum AND the string literal
forms — Store::defaultBackend(StoreBackendKind::Redis) is equivalent
to Store::defaultBackend('redis'). The string Store::BACKEND_REDIS
constant remains for back-compat; it just happens to equal
StoreBackendKind::Redis->value.
Prefer this in new code — IDE autocomplete + refactor-safe + the value is verified at the type-system boundary instead of at runtime.
Table of Contents
Cases
Methods
- coerce() : self
- Normalise a mixed-typed input (enum, string, or null) into an enum case. Throws InvalidArgumentException on an unknown string.
Cases
Table
Redis
Tiered
Memcached
Methods
coerce()
Normalise a mixed-typed input (enum, string, or null) into an enum case. Throws InvalidArgumentException on an unknown string.
public
static coerce(self|string $kind) : self
Parameters
- $kind : self|string