RegistryService
extends BaseService
in package
Store and retrieve arbitrary data. With the registry service you don't need to encode/decode your data. It's smart enough to know what you've provided and handle it appropriately.
$o = new \stdClass;
$o->foo = 'bar';
$svs->set('test', $o);
...
$svs->get('test')->bar;
Table of Contents
- $stack : mixed
- get() : mixed
- set() : self
- Set a registry value, override if it exists.
- decodeValue() : mixed
- Decode serialized value
- encodeValue() : mixed
- Encode value as scalar, array or object
Properties
$stack
protected
mixed
$stack
= []
Methods
get()
public
get(mixed $key) : mixed
Parameters
- $key : mixed
Return values
mixed —set()
Set a registry value, override if it exists.
public
set(string $key, mixed $value) : self
Parameters
- $key : string
- $value : mixed
Return values
self —decodeValue()
Decode serialized value
private
decodeValue(string $v) : mixed
Parameters
- $v : string
Return values
mixed —encodeValue()
Encode value as scalar, array or object
private
encodeValue(mixed $v) : mixed
Parameters
- $v : mixed