Documentation

TraceMiddleware
in package

Traces state changes between middlewares.

Table of Contents

$authHeaders  : mixed
$authStrings  : mixed
$config  : mixed
$prevInput  : mixed
$prevOutput  : mixed
$service  : Service
__construct()  : mixed
Configuration array can contain the following key value pairs.
__invoke()  : mixed
commandArray()  : mixed
compareArray()  : mixed
compareStep()  : mixed
createHttpDebug()  : mixed
exceptionArray()  : mixed
flushHttpDebug()  : mixed
getRedactedArray()  : array<string|int, mixed>
redactHeaders()  : mixed
requestArray()  : mixed
responseArray()  : mixed
resultArray()  : mixed
stepInput()  : mixed
stepOutput()  : mixed
str()  : mixed
streamStr()  : mixed
write()  : mixed

Properties

$authHeaders

private static mixed $authHeaders = ['X-Amz-Security-Token' => '[TOKEN]']

$authStrings

private static mixed $authStrings = [ // S3Signature '/AWSAccessKeyId=[A-Z0-9]{20}&/i' => 'AWSAccessKeyId=[KEY]&', // SignatureV4 Signature and S3Signature '/Signature=.+/i' => 'Signature=[SIGNATURE]', // SignatureV4 access key ID '/Credential=[A-Z0-9]{20}\//i' => 'Credential=[KEY]/', // S3 signatures '/AWS [A-Z0-9]{20}:.+/' => 'AWS AKI[KEY]:[SIGNATURE]', // STS Presigned URLs '/X-Amz-Security-Token=[^&]+/i' => 'X-Amz-Security-Token=[TOKEN]', // Crypto *Stream Keys '/\["key.{27,36}Stream.{9}\]=>\s+.{7}\d{2}\) "\X{16,64}"/U' => '["key":[CONTENT KEY]]', ]

Methods

__construct()

Configuration array can contain the following key value pairs.

public __construct([array<string|int, mixed> $config = [] ][, Service $service = null ]) : mixed
  • logfn: (callable) Function that is invoked with log messages. By default, PHP's "echo" function will be utilized.
  • stream_size: (int) When the size of a stream is greater than this number, the stream data will not be logged. Set to "0" to not log any stream data.
  • scrub_auth: (bool) Set to false to disable the scrubbing of auth data from the logged messages.
  • http: (bool) Set to false to disable the "debug" feature of lower level HTTP adapters (e.g., verbose curl output).
  • auth_strings: (array) A mapping of authentication string regular expressions to scrubbed strings. These mappings are passed directly to preg_replace (e.g., preg_replace($key, $value, $debugOutput) if "scrub_auth" is set to true.
  • auth_headers: (array) A mapping of header names known to contain sensitive data to what the scrubbed value should be. The value of any headers contained in this array will be replaced with the if "scrub_auth" is set to true.
Parameters
$config : array<string|int, mixed> = []
$service : Service = null
Return values
mixed

__invoke()

public __invoke(mixed $step, mixed $name) : mixed
Parameters
$step : mixed
$name : mixed
Return values
mixed

compareArray()

private compareArray(mixed $a, mixed $b, mixed $path, array<string|int, mixed> &$diff) : mixed
Parameters
$a : mixed
$b : mixed
$path : mixed
$diff : array<string|int, mixed>
Return values
mixed

compareStep()

private compareStep(array<string|int, mixed> $a, array<string|int, mixed> $b, mixed $title, array<string|int, mixed> $keys) : mixed
Parameters
$a : array<string|int, mixed>
$b : array<string|int, mixed>
$title : mixed
$keys : array<string|int, mixed>
Return values
mixed

exceptionArray()

private exceptionArray(mixed $e) : mixed
Parameters
$e : mixed
Return values
mixed

redactHeaders()

private redactHeaders(array<string|int, mixed> $headers) : mixed
Parameters
$headers : array<string|int, mixed>
Return values
mixed

resultArray()

private resultArray(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

stepInput()

private stepInput(mixed $entry) : mixed
Parameters
$entry : mixed
Return values
mixed

stepOutput()

private stepOutput(mixed $start, mixed $entry) : mixed
Parameters
$start : mixed
$entry : mixed
Return values
mixed

str()

private str(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

write()

private write(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

Search results