Profiler
in package
Profiler or benchmark the application.
This class is running on Rundiz\Profiler.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- The class constructor.
- displayDb() : mixed
- Display Profiler DB.
- end() : string|null
- End profiler.
- init() : string|null
- Initialize the profiler.
- appendProfiler() : string|null
- Append profiler to html body.
- checkDisplayProfiler() : bool
- Check that does it should be display the profiler.
Properties
$Config
protected
Config
$Config
$Container
protected
Container
$Container
Methods
__construct()
The class constructor.
public
__construct(Container $Container) : mixed
Parameters
- $Container : Container
-
The DI container class.
displayDb()
Display Profiler DB.
public
displayDb() : mixed
This part is not accessible by any URL. it can be used via $Profiler->display()
only. So, it must be public scope.
end()
End profiler.
public
end([string|null $response = '' ]) : string|null
This method is After middleware, it will be called after processed controllers.
Parameters
- $response : string|null = ''
Return values
string|nullinit()
Initialize the profiler.
public
init([string|null $response = '' ]) : string|null
Parameters
- $response : string|null = ''
Return values
string|nullappendProfiler()
Append profiler to html body.
protected
appendProfiler(string|false $responseContentType[, string|null $response = '' ]) : string|null
This method was called from end()
.
Parameters
- $responseContentType : string|false
-
The response content type.
- $response : string|null = ''
Return values
string|nullcheckDisplayProfiler()
Check that does it should be display the profiler.
protected
checkDisplayProfiler(mixed &$responseContentType) : bool
This method was called from end()
.
Parameters
- $responseContentType : mixed
-
The response content type to be altered while checking.
Tags
Return values
bool —Return true
if it should be displayed but have to set display content type with the parameter $responseContentType
.
Return false
if it should not displayed.