Skip to content

leaditin/filter

Repository files navigation

Filter

Programmatically filter and normalize data and files.

Build Status Code Quality Code Coverage Latest Version PDS Skeleton

Installation

The preferred method of installation is via Composer. Run the following command to install the latest version of a package and add it to your project's composer.json:

composer require leaditin/filter

Usage

Camel Case

use \Leaditin\Filter\CamelCase;

$filter = new CamelCase();
echo $filter->filter('my-property');

Humanize

use \Leaditin\Filter\Humanize;

$filter = new Humanize();
echo $filter->filter('my-property');

Plural

use \Leaditin\Filter\Plural;

$filter = new Plural();
echo $filter->filter('property');

Singular

use \Leaditin\Filter\Singular;

$filter = new Singular();
echo $filter->filter('properties');

Underscore

use \Leaditin\Filter\Underscore;

$filter = new Underscore();
echo $filter->filter('my property');

Credits

License

Released under MIT License - see the License File for details.