StorageFacade
in package
implements
StorageFacadeInterface
Table of Contents
Interfaces
Properties
- $experimentStorage : ExperimentStorageInterface
- $settingsStorage : SettingsStorageInterface
- $userStorage : UserStorageInterface
- $websiteStorage : WebsiteStorageInterface
Methods
- __construct() : mixed
- findUser() : User|null
- getExperiments() : array<string|int, mixed>
- getLastExperimentsFetchTime() : int|null
- Gets the timestamp of the last time experiments were fetched
- getSettings() : array<string|int, mixed>
- getWebsiteId() : string|null
- saveExperiments() : bool
- saveLastExperimentsFetchTime() : bool
- Sets the timestamp of the last time experiments were fetched
- saveSettings() : bool
- saveUser() : bool
- saveWebsiteId() : bool
Properties
$experimentStorage
private
ExperimentStorageInterface
$experimentStorage
$settingsStorage
private
SettingsStorageInterface
$settingsStorage
$userStorage
private
UserStorageInterface
$userStorage
$websiteStorage
private
WebsiteStorageInterface
$websiteStorage
Methods
__construct()
public
__construct(UserStorageInterface $userStorage, ExperimentStorageInterface $experimentStorage, WebsiteStorageInterface $websiteStorage, SettingsStorageInterface $settingsStorage) : mixed
Parameters
- $userStorage : UserStorageInterface
- $experimentStorage : ExperimentStorageInterface
- $websiteStorage : WebsiteStorageInterface
- $settingsStorage : SettingsStorageInterface
findUser()
public
findUser(string $userId) : User|null
Parameters
- $userId : string
Return values
User|nullgetExperiments()
public
getExperiments() : array<string|int, mixed>
Return values
array<string|int, mixed>getLastExperimentsFetchTime()
Gets the timestamp of the last time experiments were fetched
public
getLastExperimentsFetchTime() : int|null
Return values
int|null —Timestamp or null if not set
getSettings()
public
getSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>getWebsiteId()
public
getWebsiteId() : string|null
Return values
string|nullsaveExperiments()
public
saveExperiments(array<string|int, mixed> $experiments) : bool
Parameters
- $experiments : array<string|int, mixed>
Return values
boolsaveLastExperimentsFetchTime()
Sets the timestamp of the last time experiments were fetched
public
saveLastExperimentsFetchTime(int $timestamp) : bool
Parameters
- $timestamp : int
Return values
boolsaveSettings()
public
saveSettings(array<string|int, mixed> $settings) : bool
Parameters
- $settings : array<string|int, mixed>
Return values
boolsaveUser()
public
saveUser(User $user) : bool
Parameters
- $user : User
Return values
boolsaveWebsiteId()
public
saveWebsiteId(string $websiteId) : bool
Parameters
- $websiteId : string