1 | <?php namespace Arcanedev\Units; |
||
15 | class UnitsManager extends Manager implements UnitsManagerContract |
||
16 | { |
||
17 | /* ------------------------------------------------------------------------------------------------ |
||
18 | | Main Functions |
||
19 | | ------------------------------------------------------------------------------------------------ |
||
20 | */ |
||
21 | /** |
||
22 | * Create the distance unit instance. |
||
23 | * |
||
24 | * @return Bases\UnitMeasure |
||
25 | */ |
||
26 | 8 | public function createDistanceDriver() |
|
30 | |||
31 | /** |
||
32 | * Create the liquid volume unit instance. |
||
33 | * |
||
34 | * @return Bases\UnitMeasure |
||
35 | */ |
||
36 | 8 | public function createLiquidVolumeDriver() |
|
40 | |||
41 | /** |
||
42 | * Create the weight unit instance. |
||
43 | * |
||
44 | * @return Bases\UnitMeasure |
||
45 | */ |
||
46 | 8 | public function createWeightDriver() |
|
50 | |||
51 | /** |
||
52 | * Get the default driver name. |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | 8 | public function getDefaultDriver() |
|
60 | |||
61 | /* ------------------------------------------------------------------------------------------------ |
||
62 | | Other Functions |
||
63 | | ------------------------------------------------------------------------------------------------ |
||
64 | */ |
||
65 | /** |
||
66 | * Create a new driver instance. |
||
67 | * |
||
68 | * @param string $driver |
||
69 | * |
||
70 | * @return mixed |
||
71 | */ |
||
72 | 24 | protected function createDriver($driver) |
|
86 | |||
87 | /** |
||
88 | * Build the unit of measurement. |
||
89 | * |
||
90 | * @param string $key |
||
91 | * @param string $unitClass |
||
92 | * |
||
93 | * @return \Arcanedev\Units\Bases\UnitMeasure |
||
94 | */ |
||
95 | 24 | protected function buildUnit($key, $unitClass) |
|
103 | } |
||
104 |