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,9 +110,7 @@
<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' =&gt; function () {
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
'mysql://root:password@localhost:3360/filegator'
);
@@ -121,7 +119,6 @@
},
],
],
],
</code></pre>
<p>Don't forget to enter correct database details.</p>
<h2 id="tweaking-session-options">Tweaking session options</h2>
@@ -130,9 +127,7 @@ 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' =&gt; function () {
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
'mysql://root:password@localhost:3360/filegator'
);
@@ -143,7 +138,6 @@ For example you can pass <code>cookie_lifetime</code> parameter to extend defaul
},
],
],
],
</code></pre>
</section>

View File

@@ -108,16 +108,13 @@
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'localfilesystem',
'adapters' =&gt; [
'localfilesystem' =&gt; function () {
'adapter' =&gt; function () {
return new \League\Flysystem\Adapter\Local(
__DIR__.'/repository'
);
},
],
],
],
</code></pre>
<h2 id="ftp-adapter">FTP Adapter</h2>
<p>See official <a href="https://flysystem.thephpleague.com/docs/adapter/ftp/">documentation</a></p>
@@ -126,9 +123,7 @@
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'ftp',
'adapters' =&gt; [
'ftp' =&gt; function () {
'adapter' =&gt; function () {
return new \League\Flysystem\Adapter\Ftp([
'host' =&gt; 'example.com',
'username' =&gt; 'demo',
@@ -139,7 +134,6 @@
},
],
],
],
</code></pre>
<h2 id="sftp-adapter">SFTP Adapter</h2>
<p>You must require additional library <code>composer require league/flysystem-sftp</code>.</p>
@@ -149,9 +143,7 @@
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'sftp',
'adapters' =&gt; [
'sftp' =&gt; function () {
'adapter' =&gt; function () {
return new \League\Flysystem\Sftp\SftpAdapter([
'host' =&gt; 'example.com',
'port' =&gt; 22,
@@ -162,7 +154,6 @@
},
],
],
],
</code></pre>
<h2 id="dropbox-adapter">Dropbox Adapter</h2>
<p>You must require additional library <code>composer require spatie/flysystem-dropbox</code>.</p>
@@ -171,10 +162,10 @@
'handler' =&gt; '\Filegator\Services\Storage\Filesystem',
'config' =&gt; [
'separator' =&gt; '/',
'config' =&gt; [],
'filesystem_adapter' =&gt; 'dropbox',
'adapters' =&gt; [
'dropbox' =&gt; function () {
'config' =&gt; [
'case_sensitive' =&gt; false,
],
'adapter' =&gt; function () {
$authorizationToken = '1234';
$client = new \Spatie\Dropbox\Client($authorizationToken);
@@ -182,7 +173,6 @@
},
],
],
],
</code></pre>
</section>