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> ],</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> </section>
</div> </div>

View File

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

View File

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