base64_decode
brefphp/bref
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Decodes data encoded with MIME base64
base64_decode
(
string $string
,
bool $strict
=
false
):
string
|
false
{
$requestBody
=
$this
->
event
[
'body'
] ??
''
;
if (
$this
->
event
[
'isBase64Encoded'
] ??
false
) {
$requestBody
=
base64_decode
(
$requestBody
);
}
return
$requestBody
;
}
src/Event/Http/HttpRequestEvent.php
public function
getData
(): array
{
return
json_decode
(
base64_decode
(
$this
->
getRawData
()),
true
);
}
public function
getEventName
():
string
src/Event/Kinesis/KinesisRecord.php
public function
getLogs
():
string
{
return
base64_decode
(
$this
->
result
->
getLogResult
());
}
src/Lambda/InvocationResult.php