From bbe9d8b6bb92b1ed15e1506f7294c0b358cf8c5f Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Mon, 24 Jun 2019 16:54:44 +0200 Subject: [PATCH] Website generation with Couscous --- configuration/storage.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configuration/storage.html b/configuration/storage.html index ffcc40c..21f6809 100644 --- a/configuration/storage.html +++ b/configuration/storage.html @@ -248,6 +248,29 @@ }, ], ], + +

Replicate Adapter

+

You must require additional library composer require league/flysystem-replicate-adapter

+

The ReplicateAdapter facilitates smooth transitions between adapters, allowing an application to stay functional and migrate its files from one adapter to another. The adapter takes two other adapters, a source and a replica. Every change is delegated to both adapters, while all the read operations are passed onto the source only.

+

See official documentation

+
        'Filegator\Services\Storage\Filesystem' => [
+            'handler' => '\Filegator\Services\Storage\Filesystem',
+            'config' => [
+                'separator' => '/',
+                'config' => [
+                    'case_sensitive' => false,
+                ],
+                'adapter' => function () {
+                    $authorizationToken = '1234';
+                    $client = new \Spatie\Dropbox\Client($authorizationToken);
+
+                    $source = new \Spatie\FlysystemDropbox\DropboxAdapter($client);
+                    $replica = new \League\Flysystem\Adapter\Local(__DIR__.'/repository');
+
+                    return new League\Flysystem\Replicate\ReplicateAdapter($source, $replica);
+                },
+            ],
+        ],