Completed
Pull Request — master (#732)
by 12345
03:41
created

Binary::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace Liip\ImagineBundle\Model;
4
5
use Liip\ImagineBundle\Binary\BinaryInterface;
6
7
class Binary implements BinaryInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $content;
13
14
    /**
15
     * @var string
16
     */
17
    protected $mimeType;
18
19
    /**
20
     * @var string
21
     */
22
    protected $format;
23
24
    /**
25
     * @param string $content
26
     * @param string $mimeType
27
     * @param string $format
28
     */
29
    public function __construct($content, $mimeType, $format = null)
30
    {
31
        $this->content = $content;
32
        $this->mimeType = $mimeType;
33
        $this->format = $format;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getContent()
40
    {
41
        return $this->content;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getMimeType()
48
    {
49
        return $this->mimeType;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getFormat()
56
    {
57
        return $this->format;
58
    }
59
}
60