Download the PHP package gsteel/dot without Composer
On this page you can find all versions of the php package gsteel/dot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor gsteel
Package dot
Short Description A Utility for retrieving typed values from nested arrays
License MIT
Homepage https://github.com/gsteel/dot
Package dot
Short Description A Utility for retrieving typed values from nested arrays
License MIT
Homepage https://github.com/gsteel/dot
Please rate this library. Is it a good library?
Informations about the package dot
Dot
Retrieve strongly typed values from deeply nested arrays.
This library will not set any values or manipulate data structures in any way. It is purely a way to retrieve information.
Usage
Give me a typed value or throw an exception
Retrieve a typed value or null
All the methods have consistent names, so floatOrNull
, boolOrNull
etc.
Retrieve a typed existing value or fallback to a given default
Dots in the array keys?
Why?
As a mostly happy psalm user, it is really boring telling Psalm the configuration array you just retrieved from your DI container has a possibly null string value somewhere. For example:
Hasn't this been done before?
Yes. Here's a few:
All versions of dot with dependencies
PHP Build Version
Package Version
Requires
php Version
~8.1 || ~8.2.0 || ~8.3
The package gsteel/dot contains the following files
Loading the files please wait ....