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
Native Teams: Payments and Employment for International Teams Icon
Native Teams: Payments and Employment for International Teams

Expand Your Global Team in 85+ Countries

With Native Teams’ Employer of Record (EOR) service, you can compliantly hire in 85+ countries without setting up a legal entity. From dedicated employee support and localised benefits to tax optimisation, we help you build a global team that feels truly cared for.
Learn More
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