1 | <?php |
||
7 | class Dimension |
||
8 | { |
||
9 | /** |
||
10 | * The source image. |
||
11 | * @var Image |
||
12 | */ |
||
13 | protected $image; |
||
14 | |||
15 | /** |
||
16 | * The device pixel ratio. |
||
17 | * @var integer |
||
18 | */ |
||
19 | protected $dpr; |
||
20 | |||
21 | /** |
||
22 | * Create dimension helper instance. |
||
23 | * @param Image $image The source image. |
||
24 | * @param integer $dpr The device pixel ratio. |
||
25 | */ |
||
26 | public function __construct(Image $image, $dpr = 1) |
||
31 | |||
32 | /** |
||
33 | * Resolve the dimension. |
||
34 | * @param string $value The dimension value. |
||
35 | * @return double The resolved dimension. |
||
36 | */ |
||
37 | public function get($value) |
||
51 | } |
||
52 |