
inflector
doctrine
Doctrine Inflector is a small library that can perform string manipulations with regard to uppercase/lowercase and singular/plural forms of words.
AI 简介
Doctrine Inflector 是一个轻量级 PHP 字符串变形工具库,专注于单词的单复数转换(如 user → users)和大小写格式标准化(如 camelCase ↔ snake_case)。它基于规则引擎实现,支持英语及部分多语言词形变化,具备可扩展的自定义规则机制,并提供无状态、无副作用的纯函数式 API。适用于 ORM 映射(如 Doctrine DBAL/ORM)、API 命名约定自动转换、代码生成器及框架底层命名解析等需要动态处理标识符形态的场景。
PHP
MIT License11.3k
Stars
139
Forks
17
Watchers
10
Issues
Star 增长
今日0
近 7 天0
近 30 天+1
综合评分66.54
默认分支2.1.x