PHP Classes

File: libraries/vendor/league/flysystem/docs/adapter/replicate.md

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   PHP Slim Framework 3 Modular Application   libraries/vendor/league/flysystem/docs/adapter/replicate.md   Download  
File: libraries/vendor/league/flysystem/docs/adapter/replicate.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PHP Slim Framework 3 Modular Application
Create modular applications using Slim Framework
Author: By
Last change:
Date: 6 years ago
Size: 732 bytes
 

Contents

Class file image Download

layout: default permalink: /adapter/replicate/ title: Replicate Adapter

Replicate Adapter

Installation

composer require league/flysystem-replicate-adapter

Usage

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.

$source = new League\Flysystem\AwsS3V3\AwsS3Adapter(...);
$replica = new League\Flysystem\Adapter\Local(...);
$adapter = new League\Flysystem\Replicate\ReplicateAdapter($source, $replica);