PHP Class yii\httpclient\debug\HttpClientPanel

Since: 2.0
Author: Paul Klimov ([email protected])
Inheritance: extends yii\debug\Panel
Show file Open project: yiisoft/yii2-httpclient Class Usage Examples

Public Methods

Method Description
calculateTimings ( ) : array Calculates given request profile timings.
getDetail ( )
getHttpClient ( ) : Client
getMethods ( ) : array Returns array request methods
getName ( )
getSummary ( )
getTypes ( ) : array Returns array request types
init ( )
save ( )
setHttpClient ( array $httpClient )

Protected Methods

Method Description
getModels ( ) : array Returns an array of models that represents logs of the current request.
getRequestMethod ( string $timing ) : string Returns HTTP request method.
getRequestType ( string $category ) : string Returns request type.
getTotalRequestTime ( array $timings ) : integer Returns total request time.

Method Details

calculateTimings() public method

Calculates given request profile timings.
public calculateTimings ( ) : array
return array timings [token, category, timestamp, traces, nesting level, elapsed time]

getDetail() public method

public getDetail ( )

getHttpClient() public method

public getHttpClient ( ) : Client
return yii\httpclient\Client

getMethods() public method

Returns array request methods
public getMethods ( ) : array
return array

getModels() protected method

Can be used with data providers such as \yii\data\ArrayDataProvider.
protected getModels ( ) : array
return array models

getName() public method

public getName ( )

getRequestMethod() protected method

Returns HTTP request method.
protected getRequestMethod ( string $timing ) : string
$timing string timing procedure string
return string request method such as GET, POST, PUT, etc.

getRequestType() protected method

Returns request type.
protected getRequestType ( string $category ) : string
$category string
return string request type such as 'normal', 'batch'

getSummary() public method

public getSummary ( )

getTotalRequestTime() protected method

Returns total request time.
protected getTotalRequestTime ( array $timings ) : integer
$timings array
return integer total time

getTypes() public method

Returns array request types
public getTypes ( ) : array
return array

init() public method

public init ( )

save() public method

public save ( )

setHttpClient() public method

public setHttpClient ( array $httpClient )
$httpClient array