@param IncomingPhysicalMessage $physicalMessage

@return IncomingLogicalMessage|null
15412
private function extractMessage(IncomingPhysicalMessage $physicalMessage)
    {
        $body = $physicalMessage->getBody();
        if ($body === null || $body === '') {
            return null;
        }

        if (!isset($physicalMessage->getHeaders()[HeaderTypeEnum::ENCLOSED_CLASS])) {
            return null;
        }

        $messageClass = $physicalMessage->getHeaders()[HeaderTypeEnum::ENCLOSED_CLASS];
        $serializer = $this->deserializerResolver->resolve($physicalMessage->getHeaders());
        $instanceMessage = $serializer->deserialize($body, $messageClass);

        return $this->logicalMessageFactory->createFromObject($instanceMessage);
    }
808065
function toMessage($message, $request = null)
    {
        $implicit = $message->isOpenID1();
        $added = $message->namespaces->addAlias($this->ns_uri,
                                                $this->ns_alias,
                                                $implicit);

        if ($added === null) {
            if ($message->namespaces->getAlias($this->ns_uri) !=
                $this->ns_alias) {
                return null;
            }
        }

        if ($request !== null) {
            $message->updateArgs($this->ns_uri,
                                 $this->getExtensionArgs($request));
        } else {
            $message->updateArgs($this->ns_uri,
                                 $this->getExtensionArgs());
        }
        return $message;
    }
1128226
public function physicalClass($translate = false) {
        $classes = $this->getSNMP()->walk1d(self::OID_ENTITY_PHYSICAL_CLASS);

        if (!$translate) {
            return $classes;
        }

        return $this->getSNMP()->translate($classes, self::$ENTITY_PHSYICAL_CLASS);
    }
839981
public function createMessage() {
        $message = new Message($this->getContext());
        $this->addChild($message);
        $qry = new CreateEntityQuery($message);
        $this->getContext()->addQuery($qry, $message);
        return $message;
    }
953529
public function getUser(IncomingMessage $matchingMessage)
    {
        $payload = $matchingMessage->getPayload();

        $user = $payload['message']['sender'];

        return new User($user['name'], null, null, $user['displayName'], $user);
    }
451780
protected function getSessionMessage(&$messageType = null)
    {
        $session = $this->getRequest()->getSession();
        $message = $session->get('Security.Message.message');
        $messageType = null;
        if (empty($message)) {
            return null;
        }

        $messageType = $session->get('Security.Message.type');
        $messageCast = $session->get('Security.Message.cast');
        if ($messageCast !== ValidationResult::CAST_HTML) {
            $message = Convert::raw2xml($message);
        }

        return sprintf('<p class="message %s">%s</p>', Convert::raw2att($messageType), $message);
    }
569334
public function getMessageType() {
    // 
    $messageType = static::types()[$this->type];
    // If not incoming
    if ($this->type != static::INCOMING) {
      // Change to uppercase
      $messageType = strtoupper($messageType);
    }
    // Return
    return $messageType;
  }
1221291
public function getMessage($messageId)
    {
        $rawMessage = $this->twilio->account->messages->get($messageId);
        $incomingMessage = $this->createIncomingMessage();
        $this->processReceive($incomingMessage, $rawMessage);

        return $incomingMessage;
    }
206560
public static function getMessageForCode($status)
    {
        if (isset(self::$messages[$status])) {
            return self::$messages[$status];
        } else {
            return null;
        }
    }
839960
public function getServiceMessageFromOrigin(DeviceInterface $device, BaseOptionedModel $message)
    {
        $badge = ($message->hasOption('badge'))
            ? (int)($message->getOption('badge') + $device->getParameter('badge', 0))
            : false;

        $sound            = $message->getOption('sound');
        $contentAvailable = $message->getOption('content-available');
        $mutableContent   = $message->getOption('mutable-content');
        $category         = $message->getOption('category');
        $urlArgs          = $message->getOption('urlArgs');
        $expire           = $message->getOption('expire');

        $alert = new ServiceAlert(
            $message->getText(),
            $message->getOption('actionLocKey'),
            $message->getOption('locKey'),
            $message->getOption('locArgs'),
            $message->getOption('launchImage'),
            $message->getOption('title'),
            $message->getOption('titleLocKey'),
            $message->getOption('titleLocArgs')
        );
        if ($actionLocKey = $message->getOption('actionLocKey')) {
            $alert->setActionLocKey($actionLocKey);
        }
        if ($locKey = $message->getOption('locKey')) {
            $alert->setLocKey($locKey);
        }
        if ($locArgs = $message->getOption('locArgs')) {
            $alert->setLocArgs($locArgs);
        }
        if ($launchImage = $message->getOption('launchImage')) {
            $alert->setLaunchImage($launchImage);
        }
        if ($title = $message->getOption('title')) {
            $alert->setTitle($title);
        }
        if ($titleLocKey = $message->getOption('titleLocKey')) {
            $alert->setTitleLocKey($titleLocKey);
        }
        if ($titleLocArgs = $message->getOption('titleLocArgs')) {
            $alert->setTitleLocArgs($titleLocArgs);
        }

        $serviceMessage = new ServiceMessage();
        $serviceMessage->setId(sha1($device->getToken() . $message->getText()));
        $serviceMessage->setAlert($alert);
        $serviceMessage->setToken($device->getToken());
        if (false !== $badge) {
            $serviceMessage->setBadge($badge);
        }
        $serviceMessage->setCustom($message->getOption('custom', []));

        if (null !== $sound) {
            $serviceMessage->setSound($sound);
        }

        if (null !== $contentAvailable) {
            $serviceMessage->setContentAvailable($contentAvailable);
        }

        if (null !== $mutableContent) {
            $serviceMessage->setMutableContent($mutableContent);
        }

        if (null !== $category) {
            $serviceMessage->setCategory($category);
        }

        if (null !== $urlArgs) {
            $serviceMessage->setUrlArgs($urlArgs);
        }

        if (null !== $expire) {
            $serviceMessage->setExpire($expire);
        }

        return $serviceMessage;
    }
401700
public String getPhysicalContact() {
    if (RegulationOfGeneExpression_Type.featOkTst && ((RegulationOfGeneExpression_Type)jcasType).casFeat_physicalContact == null)
      jcasType.jcas.throwFeatMissing("physicalContact", "de.julielab.jules.types.bootstrep.RegulationOfGeneExpression");
    return jcasType.ll_cas.ll_getStringValue(addr, ((RegulationOfGeneExpression_Type)jcasType).casFeatCode_physicalContact);}
836416
public function prepareMessage($message, $properties = null)
    {
        if (empty($message)) {
            throw new Exception('AMQP message can not be empty');
        }
        if (is_array($message) || is_object($message)) {
            $message = Json::encode($message);
        }
        return new AMQPMessage($message, $properties);
    }
320430
public static function getStartLine(MessageInterface $message)
    {
        if ($message instanceof RequestInterface) {
            return trim($message->getMethod() . ' '
                . $message->getResource())
                . ' HTTP/' . $message->getProtocolVersion();
        } elseif ($message instanceof ResponseInterface) {
            return 'HTTP/' . $message->getProtocolVersion() . ' '
                . $message->getStatusCode() . ' '
                . $message->getReasonPhrase();
        } else {
            throw new \InvalidArgumentException('Unknown message type');
        }
    }
757097
public function setMessageType(\BisonLab\SakonninBundle\Entity\MessageType $messageType = null)
    {
        $this->message_type = $messageType;

        return $this;
    }
1113525
protected function getResponse(IncomingMessage $message)
    {
        $response = $this->http->post($this->apiUrl, [], [
            'query' => [$message->getText()],
            'sessionId' => md5($message->getConversationIdentifier()),
            'lang' => $this->lang,
        ], [
            'Authorization: Bearer '.$this->token,
            'Content-Type: application/json; charset=utf-8',
        ], true);

        $this->response = json_decode($response->getContent());

        return $this->response;
    }
805629
public com.google.protobuf.ByteString
      getPhysicalDeviceDescBytes() {
    java.lang.Object ref = physicalDeviceDesc_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      physicalDeviceDesc_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
610424
public static function getMessage()
    {
        $result = static::$message;
        if (empty($result)) {
            static::setMessage(static::DEFAULT_MESSAGE);
            $result = static::$message;
        }
        return $result;
    }