Nextcloud PHP API (master)

IProfiler

This interface allows to interact with the built-in Nextcloud profiler.

Tags
since
24.0.0

Table of Contents

Methods

add()  : void
Add a new data collector to the profiler. This allows to later on collect all the data from every registered collector.
clear()  : void
Clear the stored profiles
collect()  : IProfile
Collect all the information from the current request and construct a IProfile from it.
dataProviders()  : array<string|int, string>
Get the list of data providers by identifier
find()  : array<string|int, mixed>
Find a profile from various search parameters
isEnabled()  : bool
Check if the profiler is enabled.
loadProfile()  : IProfile|null
Load a profile from the response token
loadProfileFromResponse()  : IProfile|null
Load a profile from a response object
saveProfile()  : bool
Save a profile on the disk. This allows to later load it again in the profiler user interface.
setEnabled()  : void
Set if the profiler is enabled.

Methods

add()

Add a new data collector to the profiler. This allows to later on collect all the data from every registered collector.

public add(IDataCollector $dataCollector) : void
Parameters
$dataCollector : IDataCollector
Tags
see
IDataCollector
since
24.0.0

clear()

Clear the stored profiles

public clear() : void
Tags
since
25.0.0

collect()

Collect all the information from the current request and construct a IProfile from it.

public collect(Request $request, Response $response) : IProfile
Parameters
$request : Request
$response : Response
Tags
since
24.0.0
Return values
IProfile

dataProviders()

Get the list of data providers by identifier

public dataProviders() : array<string|int, string>
Tags
since
24.0.0
Return values
array<string|int, string>

find()

Find a profile from various search parameters

public find(string|null $url, int|null $limit, string|null $method, int|null $start, int|null $end[, string|null $statusCode = null ]) : array<string|int, mixed>
Parameters
$url : string|null
$limit : int|null
$method : string|null
$start : int|null
$end : int|null
$statusCode : string|null = null
Tags
since
24.0.0
Return values
array<string|int, mixed>

isEnabled()

Check if the profiler is enabled.

public isEnabled() : bool

If it is not enabled, data provider shouldn't be created and shouldn't collect any data.

Tags
since
24.0.0
Return values
bool

loadProfile()

Load a profile from the response token

public loadProfile(string $token) : IProfile|null
Parameters
$token : string
Tags
since
24.0.0
Return values
IProfile|null

loadProfileFromResponse()

Load a profile from a response object

public loadProfileFromResponse(Response $response) : IProfile|null
Parameters
$response : Response
Tags
since
24.0.0
Return values
IProfile|null

saveProfile()

Save a profile on the disk. This allows to later load it again in the profiler user interface.

public saveProfile(IProfile $profile) : bool
Parameters
$profile : IProfile
Tags
since
24.0.0
Return values
bool

setEnabled()

Set if the profiler is enabled.

public setEnabled(bool $enabled) : void
Parameters
$enabled : bool
Tags
see
isEnabled
since
24.0.0

        
On this page

Search results