RMS\PushNotificationsBundle\Service\OS\BlackberryNotification::doSend PHP Метод

doSend() защищенный Метод

Does the actual sending
protected doSend ( RMS\PushNotificationsBundle\Message\BlackberryMessage $message ) : boolean
$message RMS\PushNotificationsBundle\Message\BlackberryMessage
Результат boolean
    protected function doSend(BlackberryMessage $message)
    {
        $separator = "mPsbVQo0a68eIL3OAxnm";
        $body = $this->constructMessageBody($message, $separator);
        $browser = new Browser(new Curl());
        $browser->getClient()->setTimeout($this->timeout);
        $listener = new BasicAuthListener($this->appID, $this->password);
        $browser->addListener($listener);
        $url = "https://pushapi.na.blackberry.com/mss/PD_pushRequest";
        if ($this->evaluation) {
            $url = "https://pushapi.eval.blackberry.com/mss/PD_pushRequest";
        }
        $headers = array();
        $headers[] = "Content-Type: multipart/related; boundary={$separator}; type=application/xml";
        $headers[] = "Accept: text/html, *";
        $headers[] = "Connection: Keep-Alive";
        $response = $browser->post($url, $headers, $body);
        return $this->parseResponse($response);
    }