class RedisStorageDriver implements StorageDriver, CanDeleteKeys (View source)

Properties

protected Application $app
protected Factory $redis
protected Tenant $tenant

Methods

__construct(Application $app, Factory $redis)

No description

tenant()

Get the current tenant.

withDefaultTenant(Tenant $tenant)

Set default tenant (will be used for get/put when no tenant is supplied).

void
ensureTenantCanBeCreated(Tenant $tenant)

Ensure a tenant can be created.

findByDomain(string $domain)

Find a tenant using a domain name.

findById(string $id)

Find a tenant using an id.

string|null
getTenantIdByDomain(string $domain)

No description

void
createTenant(Tenant $tenant)

No description

void
updateTenant(Tenant $tenant)

No description

void
deleteTenant(Tenant $tenant)

No description

array
all(array $ids = [])

Return a list of all tenants.

makeTenant(array $data)

Make a Tenant instance from low-level array data.

mixed
get(string $key, Tenant $tenant = null)

Get a value from storage.

void
getMany(array $keys, Tenant $tenant = null)

Get multiple values from storage.

void
put(string $key, mixed $value, Tenant $tenant = null)

Put a value into storage.

void
putMany(array $kvPairs, Tenant $tenant = null)

Put multiple values into storage.

void
deleteMany(array $keys, Tenant $tenant = null)

Delete keys from the storage.

Details

__construct(Application $app, Factory $redis)

No description

Parameters

Application $app
Factory $redis

protected Tenant tenant()

Get the current tenant.

Return Value

Tenant

StorageDriver withDefaultTenant(Tenant $tenant)

Set default tenant (will be used for get/put when no tenant is supplied).

Parameters

Tenant $tenant

Return Value

StorageDriver

void ensureTenantCanBeCreated(Tenant $tenant)

Ensure a tenant can be created.

Parameters

Tenant $tenant

Return Value

void

Exceptions

TenantCannotBeCreatedException

Tenant findByDomain(string $domain)

Find a tenant using a domain name.

Parameters

string $domain

Return Value

Tenant

Tenant findById(string $id)

Find a tenant using an id.

Parameters

string $id

Return Value

Tenant

Exceptions

TenantCouldNotBeIdentifiedException

string|null getTenantIdByDomain(string $domain)

No description

Parameters

string $domain

Return Value

string|null

void createTenant(Tenant $tenant)

No description

Parameters

Tenant $tenant

Return Value

void

void updateTenant(Tenant $tenant)

No description

Parameters

Tenant $tenant

Return Value

void

void deleteTenant(Tenant $tenant)

No description

Parameters

Tenant $tenant

Return Value

void

array all(array $ids = [])

Return a list of all tenants.

Parameters

array $ids

Return Value

array

protected Tenant makeTenant(array $data)

Make a Tenant instance from low-level array data.

Parameters

array $data

Return Value

Tenant

mixed get(string $key, Tenant $tenant = null)

Get a value from storage.

Parameters

string $key
Tenant $tenant

Return Value

mixed

void getMany(array $keys, Tenant $tenant = null)

Get multiple values from storage.

Parameters

array $keys
Tenant $tenant

Return Value

void

void put(string $key, mixed $value, Tenant $tenant = null)

Put a value into storage.

Parameters

string $key
mixed $value
Tenant $tenant

Return Value

void

void putMany(array $kvPairs, Tenant $tenant = null)

Put multiple values into storage.

Parameters

array $kvPairs
Tenant $tenant

Return Value

void

void deleteMany(array $keys, Tenant $tenant = null)

Delete keys from the storage.

Parameters

array $keys
Tenant $tenant

Return Value

void