Interface Yiisoft\DataResponse\DataResponseFactoryInterface
| Implemented by | Yiisoft\DataResponse\DataResponseFactory |
|---|
DataResponseFactoryInterface is the interface that should be implemented by data response factory classes.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| createResponse() | Creates an instance of the data response. | Yiisoft\DataResponse\DataResponseFactoryInterface |
Method Details
Creates an instance of the data response.
| public abstract Yiisoft\DataResponse\DataResponse createResponse ( mixed $data = null, integer $code = Status::OK, string $reasonPhrase = '' ) | ||
| $data | mixed |
The response data. |
| $code | integer |
The response status code. |
| $reasonPhrase | string |
The response reason phrase associated with the status code. |
| return | Yiisoft\DataResponse\DataResponse |
The instance of the data response. |
|---|---|---|
public function createResponse($data = null, int $code = Status::OK, string $reasonPhrase = ''): DataResponse;
Signup or Login in order to comment.