Class yii\httpclient\debug\SearchModel
| Inheritance | yii\httpclient\debug\SearchModel » yii\debug\models\search\Base | 
|---|---|
| Available since extension's version | 2.0 | 
| Source Code | https://github.com/yiisoft/yii2-httpclient/blob/master/src/debug/SearchModel.php | 
Log search model.
Public Properties
| Property | Type | Description | Defined By | 
|---|---|---|---|
| $method | string | Method of the input search value | yii\httpclient\debug\SearchModel | 
| $request | integer | Request attribute input search value | yii\httpclient\debug\SearchModel | 
| $type | string | Type of the input search value | yii\httpclient\debug\SearchModel | 
Public Methods
| Method | Description | Defined By | 
|---|---|---|
| attributeLabels() | yii\httpclient\debug\SearchModel | |
| rules() | yii\httpclient\debug\SearchModel | |
| search() | Returns data provider with filled models. Filter applied if needed. | yii\httpclient\debug\SearchModel | 
Property Details
Method Details
| public void attributeLabels ( ) | 
                public function attributeLabels()
{
    return [
        'type' => 'Type',
        'method' => 'Method',
        'request' => 'Request',
    ];
}
            
        
| public void rules ( ) | 
                public function rules()
{
    return [
        [['type', 'method', 'request'], 'safe'],
    ];
}
            
        Returns data provider with filled models. Filter applied if needed.
| public \yii\data\ArrayDataProvider search ( $params, $models ) | ||
| $params | array | An array of parameter values indexed by parameter names | 
| $models | array | Data to return provider for | 
                public function search($params, $models)
{
    $dataProvider = new ArrayDataProvider([
        'allModels' => $models,
        'pagination' => false,
        'sort' => [
            'attributes' => ['duration', 'seq', 'type', 'method', 'request'],
            'defaultOrder' => [
                'duration' => SORT_DESC,
            ],
        ],
    ]);
    if (!($this->load($params) && $this->validate())) {
        return $dataProvider;
    }
    $filter = new Filter();
    $this->addCondition($filter, 'type', true);
    $this->addCondition($filter, 'method', true);
    $this->addCondition($filter, 'request', true);
    $dataProvider->allModels = $filter->filter($models);
    return $dataProvider;
}