linio/util

Generic component that provides many helper classes, such as JSON parsing, conversion tools, data structures, etc.

Maintainers

Details

github.com/LinioIT/util

Source

Issues

Installs: 71 977

Dependents: 4

Suggesters: 0

Security: 0

Stars: 9

Watchers: 52

Forks: 5

Open Issues: 4

pkg:composer/linio/util

4.0.0 2022-02-17 00:08 UTC

README

Latest Stable Version License Build Status Scrutinizer Code Quality

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