loadAppHandler(); } /** * @return $this */ protected function loadAppHandler() { $register = new HandlerRegister(); $HandlerClasses = $register->getHandlers(); foreach ($HandlerClasses as $HandlerClass) { $handler = new $HandlerClass(); if ($handler instanceof HandlerBase) { /** @var HandlerBase $handler */ $handler->register(); } } return $this; } public function setMall($mall) { $this->mall = $mall; } public function getMall() { if(!$this->mall){ $mallId = $this->mallId; if(!$mallId){ throw new Exception('门店不存在'); } $mall = Mall::findOne($mallId); if(!$mall){ throw new Exception('门店不存在'); } $this->mall = $mall; } return $this->mall; } public function getHostInfo() { if ($this->hostInfo) { return $this->hostInfo; } return ''; } public function setHostInfo($hostInfo) { $this->hostInfo = $hostInfo; } public function getBaseUrl() { if ($this->baseUrl) { return $this->baseUrl; } return ''; } public function setBaseUrl($baseUrl) { $this->baseUrl = $baseUrl; } }