$storage = new \Zero\Storage\ArrayStorage([
'key' => 'value',
'keyNull' => null
]);
// $storage = new \Zero\Storage\SessionStorage();
$storage->get('key'); //value
$storage->get('not-exists', 'defaultValue'); //defaultValue
$storage->key; //value
$storage['key']; //value
$storage->has('key'); //true
$storage->has('keyNull'); //false
$storage->exists('keyNull'); //true
isset($storage->key); //true
isset($storage['key']); //true
$storage->set('newKey', 'value');
$storage->newKey = value;
$storage['newKey'] = value;
$storage->has('newKey'); //true
$storage->remove('newKey');
//unset($storage->newKey);
//unset($storage['newKey']);
$storage->has('test'); //false
-
Notifications
You must be signed in to change notification settings - Fork 0
License
zer0php/storage
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published