Alpha ZealPHP is early-stage and under active development. APIs may change between minor versions until v1.0. Feedback and bug reports welcome on GitHub.
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

Memcached  = 'memcached'
Redis  = 'redis'
Table  = 'table'
Tiered  = 'tiered'

Methods

coerce()  : self
Normalise a mixed-typed input (enum, string, or null) into an enum case. Throws InvalidArgumentException on an unknown string.

Cases

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
Return values
self
On this page