linio/util

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

3.0.0 2020-01-02 16:27 UTC

This package is auto-updated.

Last update: 2020-09-10 04:58:29 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