Just a re-release locking the interface in place. First final release!
Changes
- Add static analysis using psalm.
Exceptionhas been renamed toGetSetExceptionfor clarity.getMultiple()has been removed from all collections.- When removing a non-existing key, since the end result is reached, no exception will be thrown anymore.
Changes
- Dropped support for php7, php8 only from now on.
Changes
- Added
getMultiple(string ...$keys): arrayso you can request multiple keys in one go. The default value if not found is alwaysnull.
// Example of getMultiple:
[$title, $content] = $postCollection->getMultiple('title', 'content');Changes
get()returnsnullor a custom default value when a key doesn't exist.remove()throws an exception.getAndRemove()also threw an exception, but the primary goal is to get the value. This behavior has been flipped. NowgetAndRemove()will returnnull/default if the key doesn't exist and not throw anymore.
No changes, code style fix.
Changes
- Add
stringtype-hinting to$keyforget()andgetAndRemove(), in line with the rest. - Add
$default = nullparameter toget(), so that the scenarios of 'not set' and 'set butnull' can be distinguished between.
Changes
- First release.