PHP code example of bref / dynamap

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

    

bref / dynamap example snippets


$dynamap = Dynamap::fromOptions([
    'region' => 'us-east-1',
], $mapping);

$dynamap->save($myObject);

$myObject = $dynamap->find(MyClass::class, 'key');
$myObject = $dynamap->get(MyClass::class, 'key'); // Same as `find()` but throws an exception if not found

$objects = $dynamap->getAll(MyClass::class);

$mapping = [
    Article::class => [
        'table' => 'articles',
        'keys' => [
            'id',
        ],
    ],
];