Skip to content

Commit

Permalink
Add demonstration configuration files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaury committed Jan 31, 2024
1 parent 6b1f24a commit f085019
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
75 changes: 75 additions & 0 deletions etc/temma-full.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

// extended configuration file for demonstration
return [
'application' => [
// data sources
'dataSources' => [
'db' => 'mysql://user:passwd@localhost/mybase',
'ndb' => 'redis://localhost:6379/0',
'cache' => 'memcache://192.168.0.1:11211;192.168.0.2:11211',
],
'enableSessions' => true,
'sessionName' => 'TemmaSession',
'sessionSource' => 'ndb',
'defaultNamespace' => '\MyApp\Controllers',
'rootController' => 'Homepage',
'defaultController' => 'NotFound',
'proxyController' => 'Main',
'defaultView' => '\Temma\Views\SmartyView',
'loader' => 'MyLoader',
'logFile' => 'log/temma.log',
'logManager' => [ 'ElasticLogManager', 'SentryLogManager' ]
],
'loglevels' => [
'Temma/Base' => 'ERROR',
'Temma/Web' => 'WARN',
'myapp' => 'DEBUG',
'default' => 'NOTE',
],
'routes' => [
'sitemap.xml' => 'SitemapController',
'robots.txt' => 'RobotsController',
'sitemap.extended.xml' => 'sitemap.xml',
],
'plugins' => [
'_pre' => [
'CheckRequestPlugin',
'UserGrantPlugin',
],
'_post' => [ 'AddCrossLinksPlugin' ],
'BobControler' => [
'_pre' => [ 'SomethingPlugin' ],
'_post' => [ 'SomethingElsePlugin' ],
'index' => [
'_pre' => [ "AaaPlugin" ],
'_post' => [ "BbbPlugin" ],
],
'setData' => [
'_pre' => [ "CccPlugin" ],
],
],
],
'errorPages' => [
'404' => 'path/to/page.html',
'500' => 'path/to/page.html',
'default' => 'path/to/page.html',
],
'includePaths' => [
'/opt/some_library/lib',
'/opt/other_lib',
],
'autoimport' => [
'googleId' => 'azeazeaez',
'googleAnalyticsId' => 'azeazeazeaze',
],
'x-homepage' => [
'title' => 'Site title',
'description' => 'Site description',
],
'x-email' => [
'senderAddress' => 'admin@localhost.localdomain',
'senderName' => 'Administrateur',
],
];

19 changes: 19 additions & 0 deletions etc/temma-mini.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

// minimum configuration file for demonstration
return [
'application' => [
// data sources
'dataSources' => [
// connection to a MySQL server
'db' => 'mysql://user:passwd@localhost/mybase',
],
// root controller
'rootController' => 'HomepageController',
],
// threshold for log messages
'loglevels' => 'WARN',
// HTML page sent when an error occurs
'errorPages' => 'error404.html',
];

0 comments on commit f085019

Please sign in to comment.