1 | <?php |
||
18 | final class PropertyNamingPolicy |
||
19 | { |
||
20 | /** |
||
21 | * Leave property name unchanged |
||
22 | */ |
||
23 | public const IDENTITY = 'IDENTITY'; |
||
24 | |||
25 | /** |
||
26 | * Convert camel case to lower case separated by dashes |
||
27 | */ |
||
28 | public const LOWER_CASE_WITH_DASHES = 'LOWER_CASE_WITH_DASHES'; |
||
29 | |||
30 | /** |
||
31 | * Convert camel case to lower case separated by underscores |
||
32 | */ |
||
33 | public const LOWER_CASE_WITH_UNDERSCORES = 'LOWER_CASE_WITH_UNDERSCORES'; |
||
34 | |||
35 | /** |
||
36 | * Convert camel case to upper case separated by dashes |
||
37 | */ |
||
38 | public const UPPER_CASE_WITH_DASHES = 'UPPER_CASE_WITH_DASHES'; |
||
39 | |||
40 | /** |
||
41 | * Convert camel case to upper case separated by underscores |
||
42 | */ |
||
43 | public const UPPER_CASE_WITH_UNDERSCORES = 'UPPER_CASE_WITH_UNDERSCORES'; |
||
44 | |||
45 | /** |
||
46 | * Capitalize the first letter of a camel case property |
||
47 | */ |
||
48 | public const UPPER_CAMEL_CASE = 'UPPER_CAMEL_CASE'; |
||
49 | |||
50 | /** |
||
51 | * Converts camel case to capitalized words |
||
52 | */ |
||
53 | public const UPPER_CAMEL_CASE_WITH_SPACES = 'UPPER_CAMEL_CASE_WITH_SPACES'; |
||
54 | |||
55 | /** |
||
56 | * List of all allowed policies |
||
57 | * |
||
58 | * @var string[] |
||
59 | */ |
||
60 | public static $policies = [ |
||
61 | self::IDENTITY, |
||
62 | self::LOWER_CASE_WITH_DASHES, |
||
63 | self::LOWER_CASE_WITH_UNDERSCORES, |
||
64 | self::UPPER_CASE_WITH_DASHES, |
||
65 | self::UPPER_CASE_WITH_UNDERSCORES, |
||
66 | self::UPPER_CASE_WITH_UNDERSCORES, |
||
67 | self::UPPER_CAMEL_CASE, |
||
68 | self::UPPER_CAMEL_CASE_WITH_SPACES, |
||
69 | ]; |
||
70 | |||
71 | private function __construct() {} |
||
72 | } |
||
73 |