linio / util
Generic component that provides many helper classes, such as JSON parsing, conversion tools, data structures, etc.
Installs: 64 912
Dependents: 4
Suggesters: 0
Security: 0
Stars: 9
Watchers: 54
Forks: 5
Open Issues: 4
Requires
- php: ^7.4 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.6
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2024-11-17 23:04:39 UTC
README
Linio Util is a generic component that provides many helper classes, such as JSON parsing, conversion tools, data structures, etc.
Install
The recommended way to install Linio Util is through composer.
$ composer require linio/util
Tests
To run the test suite, you need install the dependencies via composer, then run PHPUnit.
$ composer install $ vendor/bin/phpunit
JSON
The library includes a JSON wrapper around json_encode
and json_decode
,
allowing you to handle parsing errors with exceptions.
<?php Json::encode(['foo' => 'bar']); Json::decode('{"foo":"bar"}');
Inflector
The library includes a small string manipulation library, with common operations in string datatypes.
<?php Inflector::pascalize('my-test'); // MyTest Inflector::camelize('my-test'); // myTest