protected function getNotification()
    {
        if ($header = $this->read()) {
            $header = $this->parseData($header);

            $payload = $this->read($header['len']);
            $payload = explode("\n", $payload, 2);
            isset($payload[1]) or $payload[1] = null;

            list($payload, $body) = $payload;

            $payload = $this->parseData($payload);

            return new Notification($header, $payload, $body);
        }
    }
protected function getNotification()
    {
        if ($header = $this->read()) {
            $header = $this->parseData($header);

            $payload = $this->read($header['len']);
            $payload = explode("\n", $payload, 2);
            isset($payload[1]) or $payload[1] = null;

            list($payload, $body) = $payload;

            $payload = $this->parseData($payload);

            return new Notification($header, $payload, $body);
        }
    }
protected function getNotification ( ) { if ( $ header = $ this -> read ( ) ) { $ header = $ this -> parseData ( $ header ) ; $ payload = $ this -> read ( $ header [ 'len' ] ) ; $ payload = explode ( "\n" , $ payload , 2 ) ; isset ( $ payload [ 1 ] ) or $ payload [ 1 ] = null ; list ( $ payload , $ body ) = $ payload ; $ payload = $ this -> parseData ( $ payload ) ; return new Notification ( $ header , $ payload , $ body ) ; } }
Returns notification from input stream if available

@return Notification
Returns notification from input stream if available