1 | <?php namespace Arcanedev\Units; |
||
14 | class UnitsManager extends Manager implements UnitsManagerContract |
||
15 | { |
||
16 | /* ------------------------------------------------------------------------------------------------ |
||
17 | | Main Functions |
||
18 | | ------------------------------------------------------------------------------------------------ |
||
19 | */ |
||
20 | /** |
||
21 | * Create the distance unit instance. |
||
22 | * |
||
23 | * @return Bases\UnitMeasure |
||
24 | */ |
||
25 | 160 | public function distance() |
|
29 | |||
30 | /** |
||
31 | * Create the liquid volume unit instance. |
||
32 | * |
||
33 | * @return Bases\UnitMeasure |
||
34 | */ |
||
35 | 144 | public function liquidVolume() |
|
39 | |||
40 | /** |
||
41 | * Create the weight unit instance. |
||
42 | * |
||
43 | * @return Bases\UnitMeasure |
||
44 | */ |
||
45 | 152 | public function weight() |
|
49 | |||
50 | /** |
||
51 | * Create the distance unit driver. |
||
52 | * |
||
53 | * @return Bases\UnitMeasure |
||
54 | */ |
||
55 | 8 | protected function createDistanceDriver() |
|
59 | |||
60 | /** |
||
61 | * Create the liquid volume unit driver. |
||
62 | * |
||
63 | * @return Bases\UnitMeasure |
||
64 | */ |
||
65 | 8 | protected function createLiquidVolumeDriver() |
|
69 | |||
70 | /** |
||
71 | * Create the weight unit driver. |
||
72 | * |
||
73 | * @return Bases\UnitMeasure |
||
74 | */ |
||
75 | 8 | protected function createWeightDriver() |
|
79 | |||
80 | /** |
||
81 | * Get the default driver name. |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | 8 | public function getDefaultDriver() |
|
89 | |||
90 | /* ------------------------------------------------------------------------------------------------ |
||
91 | | Other Functions |
||
92 | | ------------------------------------------------------------------------------------------------ |
||
93 | */ |
||
94 | /** |
||
95 | * Build the unit of measurement. |
||
96 | * |
||
97 | * @param string $key |
||
98 | * @param string $unitClass |
||
99 | * |
||
100 | * @return \Arcanedev\Units\Bases\UnitMeasure |
||
101 | */ |
||
102 | 456 | protected function buildUnit($key, $unitClass) |
|
110 | } |
||
111 |