src/VkCommunityCallbackDriver.php
/**
     * Retrieves a private message from payload.
     *
     * @param ParameterBag $payload
     * @return false|array Private message (https://vk.com/dev/objects/message) as array or false
     */
Retrieves a private message from payload.
@param ParameterBag $payload
@return false|array Private message  as array or false
Retrieves a private message from payload . @param ParameterBag $payload @return false|array Private message as array or false
private function extractPrivateMessageFromPayload(ParameterBag $payload)
    {
        switch ($payload->get("type")) {
            case "message_new":
                return $this->payload->get("object")["message"];
            case "message_reply":
            case "message_edit":
                return $this->payload->get("object");
            default:
                return false;
        }
    }
private function extractPrivateMessageFromPayload ( ParameterBag $ payload ) { switch ( $ payload -> get ( " type " ) ) { case " message_new " : return $ this -> payload -> get ( " object " ) [ " message " ] ; case " message_reply " : case " message_edit " : return $ this -> payload -> get ( " object " ) ; default : return false ; } }
Retrieves a private message from payload.
Retrieves a private message from payload .