PHP Classes

File: src/settings.php

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  Chronicle  >  src/settings.php  >  Download  
File: src/settings.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Chronicle
Append arbitrary data to a storage container
Author: By
Last change:
Date: 3 years ago
Size: 993 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

/* Local settings; not checked into git. */
$localSettings = [];
if (\
is_readable(CHRONICLE_APP_ROOT . '/local/settings.json')) {
   
$settingsFile = \file_get_contents(CHRONICLE_APP_ROOT . '/local/settings.json');
    if (\
is_string($settingsFile)) {
       
$localSettings = \json_decode($settingsFile, true);
    }
}

/* These are the defaults. You can override them locally by updating ../local/settings.json: */
$settings = [
   
'displayErrorDetails' => false, // set to false in production
   
'addContentLengthHeader' => false, // Allow the web server to send the content-length header

    // Renderer settings
   
'renderer' => [
       
'template_path' => CHRONICLE_APP_ROOT . '/templates/',
    ],

   
// Monolog settings
   
'logger' => [
       
'name' => 'paragonie-chronicle',
       
'path' => CHRONICLE_APP_ROOT . '/logs/app.log',
       
'level' => \Monolog\Logger::DEBUG,
    ],
];

return [
   
'settings' => $localSettings + $settings
];

For more information send a message to info at phpclasses dot org.