PHP code example of infernalmedia / flysystem-gitea-storage
1. Go to this page and download the library: Download infernalmedia/flysystem-gitea-storage 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/ */
infernalmedia / flysystem-gitea-storage example snippets
// Create a Gitea Client to talk with the API
$client = new Client('username', 'repository', 'branch', 'base-url', 'personal-access-token');
// Create the Adapter that implements Flysystems AdapterInterface
$adapter = new GiteaAdapter(
// Gitea API Client
$client,
// Optional path prefix
'path/prefix',
);
// The FilesystemOperator
$filesystem = new League\Flysystem\Filesystem($adapter);
// see http://flysystem.thephpleague.com/api/ for full list of available functionality