bastian / inflector
A comprehensive package for converting singular nouns to their plural and back.
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/bastian/inflector
Requires (Dev)
- phpspec/phpspec: 2.0.x-dev
This package is not auto-updated.
Last update: 2025-10-25 19:59:04 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.