123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
-
-
- namespace Doctrine\Common\Util;
-
-
- class Inflector
- {
-
-
- public static function tableize($word)
- {
- return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word));
- }
-
-
-
- public static function classify($word)
- {
- return str_replace(" ", "", ucwords(strtr($word, "_-", " ")));
- }
-
-
-
- public static function camelize($word)
- {
- return lcfirst(self::classify($word));
- }
- }
|