* @license GPL https://xxx.com * @link https://xxx.com * @ctime: 2020/6/8 14:08 */ namespace App\Handlers; class BaseBikeControl { protected static $bikeControl; protected static $box_no; public function __construct($box_no) { self::$box_no = $box_no; if(strlen($box_no) < 10){ self::$bikeControl = new BikeControl(); }else{ self::$bikeControl = new \App\Handlers\Weikemu\BikeControl(); } } public static function openLock(){ return self::$bikeControl::openLock(self::$box_no); } public static function closeLock(){ return self::$bikeControl::closeLock(self::$box_no); } public static function temporaryCloseLock(){ return self::$bikeControl::temporaryCloseLock(self::$box_no); } public static function temporaryOpnLock(){ return self::$bikeControl::temporaryOpnLock(self::$box_no); } public static function bellBike(){ return self::$bikeControl::bellBike(self::$box_no); } public static function nowBikeLocation(){ return self::$bikeControl::nowBikeLocation(self::$box_no); } public static function openBatteryLock(){ return self::$bikeControl::openBatteryLock(self::$box_no); } public static function outAreaLoseElectric(){ return self::$bikeControl::outAreaLoseElectric(self::$box_no); } public static function outAreaGetElectric(){ return self::$bikeControl::outAreaGetElectric(self::$box_no); } public static function rebootBox(){ return self::$bikeControl::rebootBox(self::$box_no); } public static function nowBikeBatteryMSG(){ return self::$bikeControl::nowBikeBatteryMSG(self::$box_no); } }