PHP code example of slims / object-storage

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

    

slims / object-storage example snippets



return [
    'repository' => [
        'provider' => \SLiMS\ObjectStorage\Gio::class,
        'options' => [
            [
                'version' => 'latest',
                'region'  => '<Region>',
                'endpoint' => '<S3 Endpoint>',
                'use_path_style_endpoint' => true,
                'credentials' => [
                    'key'    => '<key>',
                    'secret' => '<secret>'
                ],
            ],
            [
               'bucket' => '<bucket>'
            ]
        ]
    ]
];


return [
    'repository' => [
        'provider' => \SLiMS\ObjectStorage\Gio::class,
        'options' => [
            [
                'version' => 'latest',
                'region'  => '<Region>',
                'endpoint' => '<S3 Endpoint>',
                'use_path_style_endpoint' => true,
                'credentials' => [
                    'key'    => '<key>',
                    'secret' => '<secret>'
                ],
            ],
            [
               'bucket' => '<bucket>'
            ]
        ]
    ],
    'backup' => [
        'provider' => \SLiMS\ObjectStorage\Gio::class,
        'options' => [
            [
                'version' => 'latest',
                'region'  => '<Region>',
                'endpoint' => '<S3 Endpoint>',
                'use_path_style_endpoint' => true,
                'credentials' => [
                    'key'    => '<key>',
                    'secret' => '<secret>'
                ],
            ],
            [
               'bucket' => '<bucket>'
            ]
        ]
    ]
    // dst
];
bash
nano config/disks.php