1 | <?php |
||
5 | class Inflector |
||
6 | { |
||
7 | /** |
||
8 | * Makes an underscored or dashed phrase human-readable. |
||
9 | * |
||
10 | * $string = $inflector->humanize('kittens-are-cats'); // "kittens are cats" |
||
11 | * $string = $inflector->humanize('dogs_as_well'); // "dogs as well" |
||
12 | * |
||
13 | * @param string $string phrase to make human-readable |
||
14 | * @return string |
||
15 | */ |
||
16 | 2 | public function humanize($string) |
|
20 | |||
21 | /** |
||
22 | * @param string $string |
||
23 | * @return string |
||
24 | */ |
||
25 | 2 | public function title($string) |
|
29 | |||
30 | /** |
||
31 | * @param string $string |
||
32 | * @return string |
||
33 | */ |
||
34 | 2 | public function titlecase($string) |
|
38 | |||
39 | /** |
||
40 | * @param string $string |
||
41 | * @return string |
||
42 | */ |
||
43 | 3 | public function initials($string) |
|
55 | } |
||
56 |