bridge) { $this->bridge = new Bridge(); } } function processQueueLogic(SendingQueue $queue) { try { $result = $this->checkKey(); } catch (\Exception $e) { $result = false; } if(empty($result['code']) || $result['code'] == Bridge::CHECK_ERROR_UNAVAILABLE) { $this->reschedule($queue, self::UNAVAILABLE_SERVICE_RESCHEDULE_TIMEOUT); return false; } return true; } abstract function checkKey(); }