| @@ 214-221 (lines=8) @@ | ||
| 211 | * |
|
| 212 | * @return mixed |
|
| 213 | */ |
|
| 214 | protected static function toCamelCase($original, $idValues, $url) |
|
| 215 | { |
|
| 216 | foreach ($original as &$o) { |
|
| 217 | $o = '{'.self::underscoreToCamelCase(self::camelCaseToUnderscore($o)).'}'; |
|
| 218 | } |
|
| 219 | ||
| 220 | return \str_replace($original, $idValues, $url); |
|
| 221 | } |
|
| 222 | ||
| 223 | /** |
|
| 224 | * Converts a underscore string to camelCase. |
|
| @@ 279-286 (lines=8) @@ | ||
| 276 | * |
|
| 277 | * @return mixed |
|
| 278 | */ |
|
| 279 | protected static function toUnderScore($original, $idValues, $url) |
|
| 280 | { |
|
| 281 | foreach ($original as &$o) { |
|
| 282 | $o = '{'.self::camelCaseToUnderscore($o).'}'; |
|
| 283 | } |
|
| 284 | ||
| 285 | return \str_replace($original, $idValues, $url); |
|
| 286 | } |
|
| 287 | } |
|
| 288 | ||