Completed
Push — master ( b1b76d...60afd2 )
by arto
03:07
created

AcceptEncoding::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * @author: stev leibelt <[email protected]>
4
 * @since: 2016-09-19
5
 */
6
namespace Net\Bazzline\Component\Curl\HeaderLine;
7
8
class AcceptEncoding extends AbstractHeaderLine
9
{
10
    /** @var string */
11
    private $prefix;
12
13
    /** @var string */
14
    private $suffix;
15
16
    /**
17
     * AcceptEncoding constructor.
18
     *
19
     * @param array|string[] $encodings - e.g. array('gzip', 'deflate')
20
     */
21
    public function __construct(array $encodings)
22
    {
23
        $this->prefix = 'Accept-Encoding';
24
        $this->suffix = implode($encodings);
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    protected function prefix()
31
    {
32
        return $this->prefix;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    protected function suffix()
39
    {
40
        return $this->suffix;
41
    }
42
}
43