CurrentUserConfigurationService
in package
implements
CurrentUserConfigurationService
Class CurrentUserConfigurationService
Interfaces, Classes and Traits
- CurrentUserConfigurationService
- Interface CurrentUserConfigurationService
Table of Contents
- $factory : UserConfigurationFactory
- $repository : UserConfigurationRepository
- $userId : UserId|null
- $userPreferences : UserPreferences
- __construct() : mixed
- CurrentUserConfigurationService constructor.
- getValue() : string|null
- Returns a user configuration value for the current user, based on the given key and default value.
- storeConfiguration() : void
- Stores a user configuration based on the given key and value.
- getCurrentUserId() : UserId
Properties
$factory
private
UserConfigurationFactory
$factory
$repository
private
UserConfigurationRepository
$repository
$userId
private
UserId|null
$userId
$userPreferences
private
UserPreferences
$userPreferences
Methods
__construct()
CurrentUserConfigurationService constructor.
public
__construct(UserConfigurationRepository $repository, UserConfigurationFactory $factory, UserPreferences $userPreferences) : mixed
Parameters
- $repository : UserConfigurationRepository
- $factory : UserConfigurationFactory
- $userPreferences : UserPreferences
Return values
mixed —getValue()
Returns a user configuration value for the current user, based on the given key and default value.
public
getValue(string $key[, string $default = null ]) : string|null
Parameters
- $key : string
- $default : string = null
Tags
Return values
string|null —storeConfiguration()
Stores a user configuration based on the given key and value.
public
storeConfiguration(string $key, string $value) : void
Parameters
- $key : string
- $value : string
Tags
Return values
void —getCurrentUserId()
private
getCurrentUserId() : UserId