ConfigurationService
in package
implements
ConfigurationService
Class ConfigurationService
Interfaces, Classes and Traits
- ConfigurationService
- Interface ConfigurationService
Table of Contents
- $factory : ConfigurationFactory
- $repository : ConfigurationRepository
- __construct() : mixed
- ConfigurationService constructor.
- delete() : void
- Deletes configurations.
- find() : Configuration
- Searches for a configuration.
- findLanguageDependent() : LanguageDependentConfiguration|null
- Searches for a language dependent configuration.
- has() : bool
- Checks if a configuration with the given key exists.
- hasLanguageDependent() : bool
- Checks if a configuration with the given key and language code exists.
- save() : void
- Saves a configuration item.
- saveBulk() : void
- Saves the configuration items.
- saveLanguageDependent() : void
- Saves language dependent configuration item.
- saveLanguageDependentBulk() : void
- Saves language dependent configuration items.
- saveConfiguration() : void
- Either adds or updates the given configuration.
- saveLanguageDependentConfiguration() : void
- Either adds or updates the given configuration.
Properties
$factory
private
ConfigurationFactory
$factory
$repository
private
ConfigurationRepository
$repository
Methods
__construct()
ConfigurationService constructor.
public
__construct(ConfigurationRepository $configurationRepository, ConfigurationFactory $configurationFactory) : mixed
Parameters
- $configurationRepository : ConfigurationRepository
- $configurationFactory : ConfigurationFactory
Return values
mixed —delete()
Deletes configurations.
public
delete(string ...$keys) : void
Parameters
- $keys : string
Tags
Return values
void —find()
Searches for a configuration.
public
find(string $key) : Configuration
Parameters
- $key : string
-
Configuration key.
Tags
Return values
Configuration —findLanguageDependent()
Searches for a language dependent configuration.
public
findLanguageDependent(string $key, string $languageCode) : LanguageDependentConfiguration|null
Parameters
- $key : string
- $languageCode : string
Tags
Return values
LanguageDependentConfiguration|null —has()
Checks if a configuration with the given key exists.
public
has(string $key) : bool
Parameters
- $key : string
-
Configuration key.
Tags
Return values
bool —hasLanguageDependent()
Checks if a configuration with the given key and language code exists.
public
hasLanguageDependent(string $key, string $languageCode) : bool
Parameters
- $key : string
- $languageCode : string
Tags
Return values
bool —save()
Saves a configuration item.
public
save(string $key, string|null $value) : void
Parameters
- $key : string
- $value : string|null
Tags
Return values
void —saveBulk()
Saves the configuration items.
public
saveBulk(array<string|int, mixed> $configurations) : void
Parameters
- $configurations : array<string|int, mixed>
Tags
Return values
void —saveLanguageDependent()
Saves language dependent configuration item.
public
saveLanguageDependent(string $key, string $languageCode, string|null $value) : void
Parameters
- $key : string
- $languageCode : string
- $value : string|null
Tags
Return values
void —saveLanguageDependentBulk()
Saves language dependent configuration items.
public
saveLanguageDependentBulk(array<string|int, mixed> $configurations) : void
Parameters
- $configurations : array<string|int, mixed>
Tags
Return values
void —saveConfiguration()
Either adds or updates the given configuration.
private
saveConfiguration(Configuration $configuration) : void
Parameters
- $configuration : Configuration
Return values
void —saveLanguageDependentConfiguration()
Either adds or updates the given configuration.
private
saveLanguageDependentConfiguration(LanguageDependentConfiguration $configuration) : void
Parameters
- $configuration : LanguageDependentConfiguration