PHP code example of league / flysystem-bundle
1. Go to this page and download the library: Download league/flysystem-bundle 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/ */
league / flysystem-bundle example snippets
use League\Flysystem\FilesystemOperator;
class MyService
{
private FilesystemOperator $storage;
// The variable name $defaultStorage matters: it needs to be the camelized version
// of the name of your storage.
public function __construct(FilesystemOperator $defaultStorage)
{
$this->storage = $defaultStorage;
}
// ...
}
use League\Flysystem\FilesystemOperator;
class MyController
{
// The variable name $defaultStorage matters: it needs to be the camelized version
// of the name of your storage.
public function index(FilesystemOperator $defaultStorage)
{
// ...
}
}