projects
/
pharext
/
pharext.org
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
4c2f868
)
default APP_ENVRIONMENT to localhost
author
Michael Wallner
<mike@php.net>
Fri, 1 May 2015 10:21:39 +0000
(12:21 +0200)
committer
Michael Wallner
<mike@php.net>
Fri, 1 May 2015 10:21:39 +0000
(12:21 +0200)
app/bootstrap/config.php
patch
|
blob
|
history
diff --git
a/app/bootstrap/config.php
b/app/bootstrap/config.php
index a8fe7bb0da85b2655377fef2e9fc04379f5f8b4a..cbf70d2d80bc843353af6b0b9be05585c6af6671 100644
(file)
--- a/
app/bootstrap/config.php
+++ b/
app/bootstrap/config.php
@@
-1,15
+1,19
@@
<?php
<?php
+namespace app;
+
use merry\Config;
use merry\Config;
+define("APP_ENVIRONMENT", getenv("APP_ENVIRONMENT") ?: "localhost");
+
$injector->share(Config::class)
->define(Config::class, [
":array" => parse_ini_file(__DIR__."/../config.ini", true),
$injector->share(Config::class)
->define(Config::class, [
":array" => parse_ini_file(__DIR__."/../config.ini", true),
- ":section" =>
getenv("APP_ENVIRONMENT")
+ ":section" =>
APP_ENVIRONMENT
])
->prepare(Config::class, function(Config $config) {
$credentials = parse_ini_file(__DIR__."/../credentials.ini", true);
])
->prepare(Config::class, function(Config $config) {
$credentials = parse_ini_file(__DIR__."/../credentials.ini", true);
- foreach (new Config($credentials,
getenv("APP_ENVIRONMENT")
) as $app => $creds) {
+ foreach (new Config($credentials,
APP_ENVIRONMENT
) as $app => $creds) {
/* one level down should suffice, i.e. $config->github->client = {id,secret,scope} */
if ($creds instanceof Config) {
foreach ($creds as $key => $val) {
/* one level down should suffice, i.e. $config->github->client = {id,secret,scope} */
if ($creds instanceof Config) {
foreach ($creds as $key => $val) {