\STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
\STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
\STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
\STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
\STREAM_NOTIFY_PROGRESS => 'PROGRESS',
\STREAM_NOTIFY_FAILURE => 'FAILURE',
\STREAM_NOTIFY_COMPLETED => 'COMPLETED',
\STREAM_NOTIFY_RESOLVE => 'RESOLVE',
];
static $args =
['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max'
];
$value = Utils::
debugResource($value);
$ident =
$request->
getMethod().' '.
$request->
getUri()->
withFragment(''
);
self::
addNotification( $params,
static function Dint
$code, ...
$passed) use ($ident,
$value,
$map,
$args): void
{ \
fprintf($value, '<%s> [%s] ',
$ident,
$map[$code]);
foreach (\
array_filter($passed) as $i =>
$v) { \
fwrite($value,
$args[$i].': "'.
$v.'" '
);
} \
fwrite($value, "\n"
);
} );
}