PHP code example of mensbeam / catcher-awsnshandler

1. Go to this page and download the library: Download mensbeam/catcher-awsnshandler library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mensbeam / catcher-awsnshandler example snippets


use MensBeam\Catcher,
    MensBeam\Catcher\AWSSNSHandler,
    Aws\Sns\SnsClient;

$client = new SnsClient([
    'version' => 'latest',
    'region' => 'us-west-2',
    'credentials' => [
        'key' => '<AWS KEY>',
        'secret' => '<AWS SECRET>'
    ]
]);
$catcher = new Catcher(new AWSSNSHandler($client, 'arn:aws:sns:us-west-2:701867229025:ook_eek'));

namespace MensBeam\Catcher;
use Aws\Sns\SnsClient;


class AWSSNSHandler extends JSONHandler {
    protected SnsClient $client;
    protected string $topicARN;


    public function __construct(SnsClient $client, string $topicARN, array $options = []);

    public function getClient(): SnsClient;
    public function setClient(SnsClient $client): void;
    public function getTopicARN(): string;
    public function setTopicARN(string $topicARN): void;
}