PHP code example of phore / objectstore
1. Go to this page and download the library: Download phore/objectstore 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/ */
phore / objectstore example snippets
$store = new ObjectStore(\Phore\ObjectStore\ObjectStoreDriverFactory::Build("gcs://<bucket-name>?keyfile=/run/secrets/google-key-1"));
$store = new ObjectStore(new GoogleCloudStoreDriver(__DIR__ . "/file/to/identity.json", "bucketName"));
$store->object("object/some.json")->put("Some Data");
if ($store->has("object/some.json"))
echo "Object existing";
echo $store->object("object/some.json")->get();
$objectStore = ObjectStore::Connect('gcs://some-bucket?keyfile=/run/secrets/xyz');