Download the PHP package gowork/values without Composer
On this page you can find all versions of the php package gowork/values. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gowork/values
More information about gowork/values
Files in gowork/values
Informations about the package values
Values
Values is a library to wrap PHP's primitive types into clean, immutable and more user-friendly objects.
Installation
It works on PHP >=8.0. This library is available on Composer/Packagist as gowork/values
. To install it execute:
or manually update your composer.json
with:
and run composer install
or composer update
afterwards. If you are not using Composer, download sources from GitHub and load them as required. However, using Composer is highly recommended.
Usage
Currently available implementations are:
ArrayValue
Object equivalent of PHP native indexed array. It contains implementation of most array_*
functions as object method.
Example:
AssocValue
Object equivalent of PHP associative array. It has all the methods of ArrayValue
with few minor differences and few additions.
StringValue
Object equivalent of PHP primitive string. It contains implementation of most str*
/mb_str*
functions as object method.
StringsArray
Object wrapping array of strings. It has all methods of ArrayValue
and StringValue
.
Calling a method inherited from StringValue
means is same as calling this method on each StringValue
element contained in StringsArray
.
IterableValue
Object wrapping iterable.
Documentation
For full methods reference and more examples see here.
Contributing
Want to contribute? Perfect! Submit an issue or Pull Request and explain what would you like to see in GW/Value
.
License
MIT license. See LICENSE file in the main directory of this repository.