- Full name:
\App\Infrastructure\Services\Attribute\AttributeManager - This class is marked as final and can't be subclassed
- This class is a Final class
Properties
type
repository
cache
Methods
__construct
public __construct(string $type, \App\Infrastructure\Services\Attribute\AttributeRepository $repository, \Psr\SimpleCache\CacheInterface $cache): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$type |
string | |
$repository |
\App\Infrastructure\Services\Attribute\AttributeRepository | |
$cache |
\Psr\SimpleCache\CacheInterface |
factory
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$type |
string | |
$namespace |
string |
Throws:
get
Retrieve attributes for the specified array.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | ID of the array attribute is for. |
$key |
string | Attribute key. |
$default |
mixed | Value to return if no result is found. |
Return Value:
Value.
all
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
bag
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
set
public set(string $id, string $key, mixed $value): \App\Infrastructure\Services\Attribute\AttributeBag
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$key |
string | |
$value |
mixed |
remove
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$key |
string |
replaceAll
public replaceAll(string $id, array<string,mixed> $values): \App\Infrastructure\Services\Attribute\AttributeBag
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$values |
array |
merge
public merge(string $id, array<string,mixed> $values): \App\Infrastructure\Services\Attribute\AttributeBag
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$values |
array |
mergeRecursive
public mergeRecursive(string $id, array $values): \App\Infrastructure\Services\Attribute\AttributeBag
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$values |
array |
forget
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
Throws:
warm
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
warmMany
public warmMany(list<string> $ids): array<string,\App\Infrastructure\Services\Attribute\AttributeBag>
Parameters:
| Parameter | Type | Description |
|---|---|---|
$ids |
list |
exists
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$key |
string |
load
Warms the cache.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string |
storeWarmCache
private storeWarmCache(string $id, \App\Infrastructure\Services\Attribute\AttributeBag $attribute): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | |
$attribute |
\App\Infrastructure\Services\Attribute\AttributeBag |