Website generation with Couscous

This commit is contained in:
Milos Stojanovic
2019-06-19 09:37:07 +02:00
parent ec365d5fa3
commit 70b27eebc7
3 changed files with 43 additions and 59 deletions

View File

@@ -113,7 +113,7 @@
],
],
],</code></pre>
<p>There are many different handlers you can use. Some of them are listed <a href="https://github.com/Seldaek/monolog#documentation">here</a>.</p>
<p>There are many different handlers you can add ot top of the stack (monolog_handlers array). Some of them are listed <a href="https://github.com/Seldaek/monolog#documentation">here</a>.</p>
</section>
</div>

View File

@@ -110,16 +110,13 @@
<pre><code> 'Filegator\Services\Session\SessionStorageInterface' =&gt; [
'handler' =&gt; '\Filegator\Services\Session\Adapters\SessionStorage',
'config' =&gt; [
'session_handler' =&gt; 'database',
'available' =&gt; [
'database' =&gt; function () {
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
'handler' =&gt; 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);
},
],
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
},
],
],
</code></pre>
@@ -130,18 +127,15 @@ For example you can pass <code>cookie_lifetime</code> parameter to extend defaul
<pre><code> 'Filegator\Services\Session\SessionStorageInterface' =&gt; [
'handler' =&gt; '\Filegator\Services\Session\Adapters\SessionStorage',
'config' =&gt; [
'session_handler' =&gt; 'database',
'available' =&gt; [
'database' =&gt; function () {
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
'handler' =&gt; function () {
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
'mysql://root:password@localhost:3360/filegator'
);
);
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([
'cookie_lifetime' =&gt; 365 * 24 * 60 * 60, // one year
], $handler);
},
],
], $handler);
},
],
],
</code></pre>

View File

@@ -108,14 +108,11 @@
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'localfilesystem',
'adapters' =&gt; [
'localfilesystem' =&gt; function () {
return new \League\Flysystem\Adapter\Local(
__DIR__.'/repository'
);
},
],
'adapter' =&gt; function () {
return new \League\Flysystem\Adapter\Local(
__DIR__.'/repository'
);
},
],
],
</code></pre>
@@ -126,18 +123,15 @@
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'ftp',
'adapters' =&gt; [
'ftp' =&gt; function () {
return new \League\Flysystem\Adapter\Ftp([
'host' =&gt; 'example.com',
'username' =&gt; 'demo',
'password' =&gt; 'password',
'port' =&gt; 21,
'timeout' =&gt; 10,
]);
},
],
'adapter' =&gt; function () {
return new \League\Flysystem\Adapter\Ftp([
'host' =&gt; 'example.com',
'username' =&gt; 'demo',
'password' =&gt; 'password',
'port' =&gt; 21,
'timeout' =&gt; 10,
]);
},
],
],
</code></pre>
@@ -149,18 +143,15 @@
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'sftp',
'adapters' =&gt; [
'sftp' =&gt; function () {
return new \League\Flysystem\Sftp\SftpAdapter([
'host' =&gt; 'example.com',
'port' =&gt; 22,
'username' =&gt; 'demo',
'password' =&gt; 'password',
'timeout' =&gt; 10,
]);
},
],
'adapter' =&gt; function () {
return new \League\Flysystem\Sftp\SftpAdapter([
'host' =&gt; 'example.com',
'port' =&gt; 22,
'username' =&gt; 'demo',
'password' =&gt; 'password',
'timeout' =&gt; 10,
]);
},
],
],
</code></pre>
@@ -171,16 +162,15 @@
'handler' =&gt; '\Filegator\Services\Storage\Filesystem',
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'dropbox',
'adapters' =&gt; [
'dropbox' =&gt; function () {
$authorizationToken = '1234';
$client = new \Spatie\Dropbox\Client($authorizationToken);
return new \Spatie\FlysystemDropbox\DropboxAdapter($client);
},
'config' =&gt; [
'case_sensitive' =&gt; false,
],
'adapter' =&gt; function () {
$authorizationToken = '1234';
$client = new \Spatie\Dropbox\Client($authorizationToken);
return new \Spatie\FlysystemDropbox\DropboxAdapter($client);
},
],
],
</code></pre>