Completed
Push — master ( 580028...d7e9e8 )
by Charles
02:19
created

Response::defaultFormatters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace yrc\web;
4
5
use yii\web\Response as YiiResponse;
6
use Yii;
7
8
class Response extends YiiResponse
9
{
10
    const FORMAT_JSON25519 = 'json+25519';
11
12
    /**
13
     * @return array the formatters that are supported by default
14
     */
15
    protected function defaultFormatters()
16
    {
17
        $formatters = parent::defaultFormatters();
18
        $formatters[self::FORMAT_JSON25519] = 'yrc\web\Json25519ResponseFormatter';
19
20
        return $formatters;
21
    }
22
}