-
Notifications
You must be signed in to change notification settings - Fork 0
StorageList
Brownie edited this page Dec 13, 2017
·
1 revision
$storageList = new StorageList(array(
'key1' => 'value1',
'key2' => 'value2',
));class MyStorageList extends StorageList
{
/**
* Initializes and sets the list.
*/
protected function initList()
{
$data = json_decode($this->getInitData(), true);
$this->setList($data);
}
}
$storageList = new MyStorageList('{"key1":"value1","key2":"value2"}');/**
* Gets a value from the storage for supported field.
*/
$value = $storageList->get('key2');