12345678910111213141516171819202122232425262728293031 |
- <?php
-
- namespace App\Http\Business;
-
- use App\Http\Business\Sensors\AbstractSensor;
- use App\Http\DBO\SensorsDbo;
- use App\Http\DBO\SensorTypesDbo;
-
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 11/23/15
- * Time: 11:59 PM
- */
- class SensorsBusiness
- {
- /**
- * @param SensorsDbo $sensor
- * @param SensorTypesDbo $type
- * @return mixed
- */
- public static function getValue(SensorsDbo $sensor, SensorTypesDbo $type)
- {
- /**
- * @var $sens AbstractSensor
- */
- $class = $type->getClass();
- $sens = new $class($sensor);
- return $sens->getValue();
- }
- }
|