phpDocumentor

GambioOmnibusPolicyTextPhrasesStorage extends ConfigurationStorage
in package

Class GambioOmnibusPolicyTextPhrasesStorage

Table of Contents

STORAGE_NAMESPACE  = 'modules/gambio/omnibus_policy/reviews/phrases'
Configuration storage namespace
$textPhrasesKeys  : array<string|int, mixed>
Language specific phrase storage
__construct()  : mixed
Constructor
delete()  : $this
Removes a phrase value
deleteAll()  : $this
Removes a phrase value
get()  : string
Return a phrase value
getAll()  : array<string|int, mixed>
Return all phrase key/value pairs
set()  : $this
Set a phrase value
setAll()  : $this
Set multiple text phrases at one time for specific key Note: input data should one of two formats 1) ['text_phrase_key_language_code_1' => 'text_value_1','text_phrase_key_language_code_2' => 'text_value_2'] 2) ['text_phrase_key' => ['language_code' => 'text_value']]
isAllowed()  : bool

Constants

Properties

Methods

delete()

Removes a phrase value

public delete(string $key) : $this
Parameters
$key : string

Configuration key

Tags
throws
InvalidArgumentException

Invalid key

Return values
$this

Same instance

get()

Return a phrase value

public get(string $key) : string
Parameters
$key : string

phrase key

Tags
throws
InvalidArgumentException

Invalid key

Return values
string

phrase value

set()

Set a phrase value

public set(string $key, string $value) : $this
Parameters
$key : string

Configuration key

$value : string

Configuration value

Tags
throws
InvalidArgumentException

Invalid key

Return values
$this

Same instance

setAll()

Set multiple text phrases at one time for specific key Note: input data should one of two formats 1) ['text_phrase_key_language_code_1' => 'text_value_1','text_phrase_key_language_code_2' => 'text_value_2'] 2) ['text_phrase_key' => ['language_code' => 'text_value']]

public setAll([array<string|int, mixed> $data = [] ]) : $this
Parameters
$data : array<string|int, mixed> = []
Return values
$this

isAllowed()

private isAllowed(string &$key[, bool $isOptional = false ]) : bool
Parameters
$key : string
$isOptional : bool = false

when false, return will be surprised and replaced with exception

Tags
note

$key is being trimmed and changed in memory for backward-compatibility reasons

Return values
bool

Search results