1 | <?php |
||
10 | class ClassUtility |
||
11 | { |
||
12 | /** |
||
13 | * @param string $fullName |
||
14 | * |
||
15 | * @return mixed |
||
16 | */ |
||
17 | 19 | public function extractClassNameFromFullName(string $fullName) |
|
24 | |||
25 | /** |
||
26 | * @param AbstractBaseSlack $object |
||
27 | * @param $attributes |
||
28 | * |
||
29 | * @return AbstractBaseSlack |
||
30 | */ |
||
31 | 12 | public function loadAttributes(AbstractBaseSlack $object, $attributes) |
|
51 | |||
52 | /** |
||
53 | * @param AbstractBaseSlack $object |
||
54 | * @param $attributeKey |
||
55 | * |
||
56 | * @return bool|string |
||
57 | */ |
||
58 | 12 | private function getSetMethodByAttribute(AbstractBaseSlack $object, string $attributeKey) |
|
79 | |||
80 | /** |
||
81 | * If text is 'ts' or ends with '_ts' replace it with 'timestamp'. |
||
82 | * |
||
83 | * @param $text |
||
84 | * |
||
85 | * @return mixed |
||
86 | */ |
||
87 | 12 | private function processTimestamp(string $text): string |
|
96 | |||
97 | /** |
||
98 | * Check if the text starts with boolean prefixes such as 'is', 'has', ... |
||
99 | * |
||
100 | * @param $text |
||
101 | * |
||
102 | * @return mixed |
||
103 | */ |
||
104 | 12 | private function findBooleanPrefix(string $text) |
|
117 | |||
118 | /** |
||
119 | * If find the boolean prefix, remove it. |
||
120 | * |
||
121 | * @param $text |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | 12 | private function removeBooleanPrefix(string $text): string |
|
135 | } |
||
136 |