SDK for PHP 3.x

TraceMiddleware
in package

Traces state changes between middlewares.

Table of Contents

Methods

__construct()  : mixed
Configuration array can contain the following key value pairs.
__invoke()  : mixed

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

__invoke()

public __invoke(mixed $step, mixed $name) : mixed
Parameters
$step : mixed
$name : mixed
On this page