Created
September 10, 2018 21:29
-
-
Save jfinstrom/80b8cfe72df1d692288fb67be06d725d to your computer and use it in GitHub Desktop.
example flysystem plugin for reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace League\Flysystem\Plugin; | |
use League\Flysystem\FilesystemInterface; | |
class MyExample extends AbstractPlugin{ | |
protected $filesystem; | |
public function setFilesystem(FilesystemInterface $filesystem){ | |
$this->filesystem = $filesystem; | |
} | |
public function getMethod(){ | |
return 'myExample'; | |
} | |
/** does the samething as "update" and is just here for reference **/ | |
public function handle($path, $contents){ | |
return $this->filesystem->update($path, $contents); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/thephpleague/flysystem-adapter-decorator for later....