From 56446d0aa3784b34744b7e6bfa75ed49e59cb6ce Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Thu, 4 Oct 2012 09:34:11 +0200 Subject: [PATCH] start to implement database part --- core/autoload.php | 2 +- core/lib/Thelia/Core/Thelia.php | 13 +++++++++++++ core/lib/Thelia/Thelia.php | 10 ---------- index_dev.php | 25 ++++++++++++++++++++++++- local/config/config_db.mysql.php | 20 ++++++++++++++++++++ local/config/config_db.pgsql.php | 19 +++++++++++++++++++ local/config/config_db.sqlite.php | 19 +++++++++++++++++++ 7 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 core/lib/Thelia/Core/Thelia.php delete mode 100644 core/lib/Thelia/Thelia.php create mode 100644 local/config/config_db.mysql.php create mode 100644 local/config/config_db.pgsql.php create mode 100644 local/config/config_db.sqlite.php diff --git a/core/autoload.php b/core/autoload.php index 68817a993..146891a37 100644 --- a/core/autoload.php +++ b/core/autoload.php @@ -22,7 +22,7 @@ foreach ($namespaces as $namespace => $directory) { $loader->registerNamespace($namespace, $directory); } -$loader->register('Thelia',__DIR__ . '/lib/'); +$loader->registerNamespace('Thelia', __DIR__ . '/lib/'); $loader->register(); diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php new file mode 100644 index 000000000..6f197424b --- /dev/null +++ b/core/lib/Thelia/Core/Thelia.php @@ -0,0 +1,13 @@ + diff --git a/core/lib/Thelia/Thelia.php b/core/lib/Thelia/Thelia.php deleted file mode 100644 index a17a100f0..000000000 --- a/core/lib/Thelia/Thelia.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/index_dev.php b/index_dev.php index caf2630f7..54073361f 100644 --- a/index_dev.php +++ b/index_dev.php @@ -1,8 +1,31 @@ getClientIp(), $trustIp)){ + //change request to send to a 404 error page +} + + +//$thelia = new Thelia('dev'); +//// +//$response = $thelia->handle($request)->prepare($request)->send(); +//// +//$thelia->terminate($request, $reponse); + +Thelia::run()->send(); + + + ?> diff --git a/local/config/config_db.mysql.php b/local/config/config_db.mysql.php new file mode 100644 index 000000000..1e54ecf4d --- /dev/null +++ b/local/config/config_db.mysql.php @@ -0,0 +1,20 @@ + diff --git a/local/config/config_db.pgsql.php b/local/config/config_db.pgsql.php new file mode 100644 index 000000000..4ec0fed8f --- /dev/null +++ b/local/config/config_db.pgsql.php @@ -0,0 +1,19 @@ + diff --git a/local/config/config_db.sqlite.php b/local/config/config_db.sqlite.php new file mode 100644 index 000000000..e20c73846 --- /dev/null +++ b/local/config/config_db.sqlite.php @@ -0,0 +1,19 @@ +