Class Message
- Aws\Sns\Message implements ArrayAccess, IteratorAggregate
- Namespace: Aws\Sns
- Located at Sns/Message.php
Represents an SNS message received over http(s).
Methods Summary
-
static
fromRawPostData ( )
Creates a Message object from the raw POST data
-
static
fromPsrRequest ( Psr\Http\Message\RequestInterface $request )
Creates a Message object from a PSR-7 Request or ServerRequest object.
-
static
fromJsonString ( string $requestBody )
Creates a Message object from a JSON-decodable string.
-
__construct ( array $data )
Creates a Message object from an array of raw message data.
- getIterator ( )
- offsetExists ( $key )
- offsetGet ( $key )
- offsetSet ( $key, $value )
- offsetUnset ( $key )
-
toArray ( )
Get all the message data as a plain array.
Methods Details
static
Aws\Sns\Message
fromRawPostData (
)
Creates a Message object from the raw POST data
Returns
Aws\Sns\Message |
Exceptions
RuntimeException If the POST data is absent, or not a valid JSON document |
static
Aws\Sns\Message
fromPsrRequest (
Psr\Http\Message\RequestInterface
$request
)
Creates a Message object from a PSR-7 Request or ServerRequest object.
Parameters
Psr\Http\Message\RequestInterface |
$request |
Returns
Aws\Sns\Message |
static
Aws\Sns\Message
fromJsonString (
string
$requestBody
)
Creates a Message object from a JSON-decodable string.
Parameters
string | $requestBody |
Returns
Aws\Sns\Message |
__construct ( array $data )
Creates a Message object from an array of raw message data.
Parameters
array | $data | The message data. |
Exceptions
InvalidArgumentException If a valid type is not provided or there are other required keys missing. |
getIterator ( )
Implementation of
IteratorAggregate::getIterator()
offsetExists ( $key )
Implementation of
ArrayAccess::offsetExists()
offsetGet ( $key )
Implementation of
ArrayAccess::offsetGet()
offsetSet ( $key, $value )
Implementation of
ArrayAccess::offsetSet()
offsetUnset ( $key )
Implementation of
ArrayAccess::offsetUnset()
array toArray ( )
Get all the message data as a plain array.
Returns
array |