Download the PHP package rmasters/stack-timer without Composer
On this page you can find all versions of the php package rmasters/stack-timer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download rmasters/stack-timer
More information about rmasters/stack-timer
Files in rmasters/stack-timer
Download rmasters/stack-timer
More information about rmasters/stack-timer
Files in rmasters/stack-timer
Vendor rmasters
Package stack-timer
Short Description Simple StackPHP middleware for timing
License MIT
Package stack-timer
Short Description Simple StackPHP middleware for timing
License MIT
Please rate this library. Is it a good library?
Informations about the package stack-timer
StackTimer

A simple StackPHP middleware that reports on the time it takes the inner middlewares/app to run. Written to figure out what Stack can do :smiley:
Usage
Simply wrap your application in the timer middleware and the load time will be injected into the response body.
$app = new App(); // implements HttpKernelInterface
$timer = new StackTimer($app);
$request = Request::createFromGlobals();
$timer->handle($request)->send();
Options
Pass an array with any of the following keys to
StackTimer::__construct(HttpKernelInterface, array):
- inject (boolean, default: false) - whether to inject into the response body,
- callbacks (callable|callable[]) - an array of closures/callables that
are passed the following arguments:
function(HttpFoundation\Request $request, float $microseconds). - format (string, default:
{ms}ms) - the text to be injected, see list of replaced strings below. - wrapper (string, default:
<div style="...">%s</div>) - HTML the text is contained in, must contain a single%swhere the text will be added. - injection (string, default:
</body>) - where to inject the snippet, this is passed throughpreg_quoteand cannot contain regular expressions. - inject_before (boolean, default: true) - whether to inject the snippet
before the injection point (i.e. before
</body>).
All versions of stack-timer with dependencies
PHP Build Version
Package Version
The package rmasters/stack-timer contains the following files
Loading the files please wait ...