-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.php.example
79 lines (58 loc) · 2.43 KB
/
settings.php.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
declare(strict_types=1);
use Lits\Config\AuthConfig;
use Lits\Config\DatabaseConfig;
use Lits\Config\FrameworkConfig;
use Lits\Config\SessionConfig;
use Lits\Config\TemplateConfig;
use Lits\Framework;
return function (Framework $framework): void {
$settings = $framework->settings();
assert($settings['framework'] instanceof FrameworkConfig);
// Whether to enable debug information.
// $settings['framework']->debug = false;
// Path to log file to be generated by the application.
// $settings['framework']->log = '';
assert($settings['session'] instanceof SessionConfig);
// Base64 encoded key with at least 32-bits of entropy. Required.
// $settings['session']->key = '';
// Seconds before a session will expire.
// $settings['session']->expires = 3600;
assert($settings['template'] instanceof TemplateConfig);
// Path to cache directory, which must be writable.
$settings['template']->cache = __DIR__ . DIRECTORY_SEPARATOR . 'cache';
// Paths to search for template files.
// $settings['template']->paths[] = '';
// Name of the site.
$settings['template']->site = 'Avalon Tools';
// HTML analytics tracking code added to head element for the site.
// $settings['template']->analytics = '';
// HTML contact information for the site.
// $settings['template']->contact = '';
// Menu for the site.
$settings['template']->menu = [
[
'text' => 'Convert Cue Sheets',
'href' => '/avalon/convert',
],
];
assert($settings['auth'] instanceof AuthConfig);
// Set the context of this application for specific roles.
$settings['auth']->context = 'avalon';
// Specify the connection details for the auth database.
$database = new DatabaseConfig();
$database->type = 'mysql';
$database->host = 'localhost';
// $database->port = 3306;
$database->username = 'auth';
$database->password = 'password';
$database->name = 'auth';
// $settings['auth']->database->prefix = 'auth_';
$settings['auth']->database = $database;
// Must be a string or null. If null, no auth is required by default.
// If 'true' auth is required for all routes. If 'false' auth is disallowed
// for all routes. If string, the user must have that role for all routes.
$settings['auth']->required = null;
// Relative path to User Management for this server.
$settings['auth']->url = '/user/';
};