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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start 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