Skip to content
PHP Ecosystem
Explore

ResponseFormatterInterface

API reference › yii › web › ResponseFormatterInterface

interfaceyii\web\ResponseFormatterInterface
Since2.0
Sourceframework/web/ResponseFormatterInterface.php
Implemented by 3 types

ResponseFormatterInterface specifies the interface needed to format a response before it is sent out.

MethodDescriptionDefined by
format() abstractFormats the specified response.ResponseFormatterInterface
abstract public function format(yii\web\Response $response): mixed

Formats the specified response.

Parameters

ParameterTypeDescription
$responseResponseThe response to be formatted.

Returns

mixed