PHP code example of tanujdave / aws

1. Go to this page and download the library: Download tanujdave/aws 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/ */

    

tanujdave / aws example snippets



namespace App;
use Printi\AwsBundle\Sns;

class HelloClass {

    private $snsClient;
    
    public function __construct(Sns $sns)
    {
        $this->snsClient = $sns;
    }
    
    public function onTransitionUpdate()
    {
        $message = [
            "order_item_id" => 11111,
            "transition"    => 'prepress_reject',
            "reference"     => null,
            "status_id"     => 50,
            "version"       => 2,
        ];
        $this->snsClient->publish('alpha_message', $message);
    }
}
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar