This commit is contained in:
Milos Stojanovic
2019-06-18 14:27:31 +02:00
parent 7f3e111d49
commit f8940c8713
9 changed files with 179 additions and 234 deletions

View File

@@ -39,13 +39,6 @@ return [
//$save_path = __DIR__.'/private/sessions';
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler($save_path);
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
},
'database' => function () {
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
'mysql://root:password@localhost:3360/filegator'
);
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
},
],
@@ -92,35 +85,6 @@ return [
__DIR__.'/repository'
);
},
'ftp' => function () {
// see: https://flysystem.thephpleague.com/docs/adapter/ftp/
return new \League\Flysystem\Adapter\Ftp([
'host' => 'example.com',
'username' => 'demo',
'password' => 'password',
'port' => 21,
'timeout' => 10,
]);
},
'sftp' => function () {
// composer require league/flysystem-sftp
// see: https://flysystem.thephpleague.com/docs/adapter/sftp/
return new \League\Flysystem\Sftp\SftpAdapter([
'host' => 'example.com',
'port' => 22,
'username' => 'demo',
'password' => 'password',
'timeout' => 10,
]);
},
'dropbox' => function () {
// composer require spatie/flysystem-dropbox
// see: https://flysystem.thephpleague.com/docs/adapter/dropbox/
$authorizationToken = '1234';
$client = new \Spatie\Dropbox\Client($authorizationToken);
return new \Spatie\FlysystemDropbox\DropboxAdapter($client);
},
],
],
],
@@ -133,14 +97,6 @@ return [
'config' => [
'file' => __DIR__.'/private/users.json',
],
//'handler' => '\Filegator\Services\Auth\Adapters\Database',
//'config' => [
// 'driver' => 'mysqli',
// 'host' => 'localhost',
// 'username' => 'root',
// 'password' => 'password',
// 'database' => 'filegator',
//],
],
'Filegator\Services\Router\Router' => [
'handler' => '\Filegator\Services\Router\Router',