using constants to load prestashop config

This commit is contained in:
Christophe LATOUR 2017-07-24 12:25:13 +02:00
parent c88ea57ba5
commit 94e719132b
7 changed files with 33 additions and 25 deletions

View File

@ -1,17 +0,0 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=e!MV*C9N*B5&#FJbyf*2c8m5QOJOGeQ6&8eCL_qo
APP_TIMEZONE=UTC
DB_CONNECTION=mysql
DB_HOST=192.168.0.44
DB_PORT=3306
DB_DATABASE=brico_dev
DB_USERNAME=brico_dev
DB_PASSWORD=brico_dev42
DOMAIN_STATIC=www.bricoprive.com
CACHE_DRIVER=file
QUEUE_DRIVER=sync

1
.gitignore vendored
View File

@ -7,7 +7,6 @@ config.codekit
.DS_Store?
.env
.env.php
.env.*.php
Homestead.json
Homestead.yaml
.idea

View File

@ -1,13 +1,10 @@
<?php
require_once __DIR__.'/../../bebeboutik/config/config.inc.php';
require_once __DIR__ . '/../../bebeboutik/config/autoload_lumen.php';
// require_once __DIR__.'/../../brico/www/config/config.inc.php';
// require_once __DIR__ . '/../../brico/www/config/autoload_lumen.php';
require_once __DIR__.'/../config/env.php';
require_once __DIR__.getenv('PRESTASHOP_CONFIG');
require_once __DIR__.getenv('PRESTASHOP_AUTOLOAD');
$composer_autoloader = require_once __DIR__.'/../vendor/autoload.php';
require_once __DIR__.'/../config/env.php';
/*
|--------------------------------------------------------------------------

2
config/.gitignore vendored
View File

@ -1,2 +1,2 @@
*
env.php
!.gitignore

15
config/api.php Normal file
View File

@ -0,0 +1,15 @@
<?php
return array(
'aliases' => [
'models' => [
'ApiTag' => 'App\Models\Tag',
'ApiCart' => 'App\Models\Cart',
'ApiCarrier' => 'App\Models\Carrier',
'ApiOrderDetail' => 'App\Models\Order\OrderDetail'
],
'controllers' => [
'ApiBaseController' => 'App\Web\Controllers\Controller',
],
],
);

7
config/env.local.php Normal file
View File

@ -0,0 +1,7 @@
<?php
putenv('APP_ENV=local');
putenv('APP_DEBUG=true');
putenv('APP_KEY=e!MV*C9N*B5&#FJbyf*2c8m5QOJOGeQ6&8eCL_qo');
putenv('APP_TIMEZONE=UTC');
putenv('PRESTASHOP_AUTOLOAD=/../../bebeboutik/config/autoload_lumen.php');
putenv('PRESTASHOP_CONFIG=/../../bebeboutik/config/config.inc.php');

7
config/env.pprod.php Normal file
View File

@ -0,0 +1,7 @@
<?php
putenv('APP_ENV=local');
putenv('APP_DEBUG=true');
putenv('APP_KEY=e!MV*C9N*B5&#FJbyf*2c8m5QOJOGeQ6&8eCL_qo');
putenv('APP_TIMEZONE=UTC');
putenv('PRESTASHOP_AUTOLOAD=/../../config/autoload_lumen.php');
putenv('PRESTASHOP_CONFIG=/../../config/config.inc.php');