bastian/inflector

A comprehensive package for converting singular nouns to their plural and back.

1.0 2014-04-12 11:44 UTC

This package is not auto-updated.

Last update: 2024-04-13 12:32:54 UTC


README

A package to transform english words from singular to plural and back.

Usage

Inflector\Inflector::plural('Tree'); // Trees

Inflector\Inflector::singular('Cakes'); // Cake

Inflector\Inflector::plural('Fish'); // Fish

Providers may be used to retrieve uncommon irregular words.

Inflector\Inflector::setProvider(new Inflector\JsonProvider);

Providers must implement the Inflector\ProviderInterface.