Completed
Pull Request — master (#1127)
by Joachim
02:41
created

CacheStoreEvent::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the `liip/LiipImagineBundle` project.
5
 *
6
 * (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Liip\ImagineBundle\Events;
13
14
use Liip\ImagineBundle\Binary\BinaryInterface;
15
use Symfony\Component\EventDispatcher\Event;
16
17
class CacheStoreEvent extends Event
18
{
19
    /**
20
     * Binary.
21
     *
22
     * @var BinaryInterface
23
     */
24
    protected $binary;
25
26
    /**
27
     * Resource path.
28
     *
29
     * @var string
30
     */
31
    protected $path;
32
33
    /**
34
     * Filter name.
35
     *
36
     * @var string
37
     */
38
    protected $filter;
39
40
    /**
41
     * Resolver.
42
     *
43
     * @var null|string
44
     */
45
    protected $resolver;
46
47
    /**
48
     * Init default event state.
49
     *
50
     * @param BinaryInterface $binary
51
     * @param string          $path
52
     * @param string          $filter
53
     * @param null|string     $resolver
54
     */
55
    public function __construct(BinaryInterface $binary, $path, $filter, $resolver = null)
56
    {
57
        $this->binary = $binary;
58
        $this->path = $path;
59
        $this->filter = $filter;
60
        $this->resolver = $resolver;
61
    }
62
63
    /**
64
     * Sets the binary
65
     *
66
     * @param BinaryInterface $binary
67
     */
68
    public function setBinary(BinaryInterface $binary)
69
    {
70
        $this->binary = $binary;
71
    }
72
73
    /**
74
     * Returns the binary
75
     *
76
     * @return BinaryInterface
77
     */
78
    public function getBinary()
79
    {
80
        return $this->binary;
81
    }
82
83
    /**
84
     * Sets resource path.
85
     *
86
     * @param $path
87
     */
88
    public function setPath($path)
89
    {
90
        $this->path = $path;
91
    }
92
93
    /**
94
     * Returns resource path.
95
     *
96
     * @return string
97
     */
98
    public function getPath()
99
    {
100
        return $this->path;
101
    }
102
103
    /**
104
     * Sets filter name.
105
     *
106
     * @param $filter
107
     */
108
    public function setFilter($filter)
109
    {
110
        $this->filter = $filter;
111
    }
112
113
    /**
114
     * Returns filter name.
115
     *
116
     * @return string
117
     */
118
    public function getFilter()
119
    {
120
        return $this->filter;
121
    }
122
123
    /**
124
     * Sets the resolver
125
     *
126
     * @param null|string $resolver
127
     */
128
    public function setResolver(?string $resolver)
129
    {
130
        $this->resolver = $resolver;
131
    }
132
133
    /**
134
     * Returns the resolver.
135
     *
136
     * @return null|string
137
     */
138
    public function getResolver()
139
    {
140
        return $this->resolver;
141
    }
142
}
143