-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add demonstration configuration files.
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
], | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
]; | ||
|