1 | <?php |
||
7 | class ParameterBag implements ParameterBagInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var int |
||
11 | */ |
||
12 | protected $width; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | protected $height; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $extra = []; |
||
23 | |||
24 | /** |
||
25 | * @param int $width |
||
26 | * @param int $height |
||
27 | * @param array $extra |
||
28 | */ |
||
29 | 15 | public function __construct($width, $height, array $extra = []) |
|
35 | |||
36 | /** |
||
37 | * @return int |
||
38 | */ |
||
39 | 12 | public function getWidth() |
|
43 | |||
44 | /** |
||
45 | * @param int $width |
||
46 | */ |
||
47 | 1 | public function setWidth($width) |
|
48 | { |
||
49 | 1 | $this->width = $width; |
|
50 | 1 | } |
|
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | 12 | public function getHeight() |
|
59 | |||
60 | /** |
||
61 | * @param int $height |
||
62 | */ |
||
63 | 1 | public function setHeight($height) |
|
64 | { |
||
65 | 1 | $this->height = $height; |
|
66 | 1 | } |
|
67 | |||
68 | /** |
||
69 | * @return array |
||
70 | */ |
||
71 | 12 | public function getExtra() |
|
75 | |||
76 | /** |
||
77 | * @param array $extra |
||
78 | */ |
||
79 | public function setExtra($extra) |
||
83 | |||
84 | /** |
||
85 | * @param $key |
||
86 | * @param $value |
||
87 | */ |
||
88 | 1 | public function addExtra($key, $value) |
|
92 | |||
93 | /** |
||
94 | * @param array $defaults |
||
95 | */ |
||
96 | 5 | public function setDefaults(array $defaults) |
|
100 | |||
101 | /** |
||
102 | * @param MediaInterface $media |
||
103 | * @return array |
||
104 | */ |
||
105 | 12 | public function toArray(MediaInterface $media) |
|
113 | } |
||
114 |