Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Commit

Permalink
Better custom config handling
Browse files Browse the repository at this point in the history
  • Loading branch information
drAlberT committed Oct 20, 2016
1 parent 8000a77 commit 3a046cd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor/
bin/
var/logs/*
.php_cs.cache
var/logs/*
app/config/config.php
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,23 @@ You can copy `app/config/config.dist.php`to `app/config/config.php` and edit as

require_once __DIR__.'/config.dist.php';

/*

... your customizations here

*/
$config = array_merge(
$config,
array(
/*
* the following are your custom settings ...
*/
'debug' => true,
'auth' => null,
'log' => array(
'driver' => 'file',
'threshold' => 5, /* 0: Disable Logging, 1: Error, 2: Warning, 3: Notice, 4: Info, 5: Debug */
'file' => array('directory' => 'var/logs')
),
)
);

return $config;

```

Expand Down
2 changes: 1 addition & 1 deletion app/config/config.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$config = array(
'default_controller' => 'Welcome',
'default_action' => 'Index',
'debug' => true,
'debug' => false,
'default_layout' => 'layout',
'timezone' => 'Europe/Rome',
'auth' => array(
Expand Down

0 comments on commit 3a046cd

Please sign in to comment.