PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words. The Doctrine Inflector has methods for inflecting text. The features include pluralization, singularization, converting between camelCase and under_score and capitalizing words. Using the inflector is easy, you can create a new Doctrine\Inflector\Inflector instance by using the Doctrine\Inflector\InflectorFactory class. By default it will create an English inflector. If you want to use another language, you can do so. The supported languages are English, Spanish, French, Portuguese, Norwegian Bokmal and Turkish. If you are interested in adding support for your language, take a look at the other languages defined in the Doctrine\Inflector\Rules namespace and the tests located in Doctrine\Tests\Inflector\Rules. You can copy one of the languages and update the rules for your language.

Features

  • You can setup custom singular and plural rules
  • You can configure an inflector that doesn't perform any operation for pluralization and/or singularization
  • You can unaccent a string of text
  • You can change pluralization and singularization within your text
  • You can also use it to change between upper and lowercase
  • The API present in Inflector 1.x is still available

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Doctrine Inflector

Doctrine Inflector Web Site

Other Useful Business Software
Resolve Support Tickets 2x Faster​ with ServoDesk Icon
Resolve Support Tickets 2x Faster​ with ServoDesk

Full access to Enterprise features. No credit card required.

What if You Could Automate 90% of Your Repetitive Tasks in Under 30 Days? At ServoDesk, we help businesses like yours automate operations with AI, allowing you to cut service times in half and increase productivity by 25% - without hiring more staff.
Try ServoDesk for free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Doctrine Inflector!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2021-06-02