From 59ec03f97442ed91de0736b10eb389c5209e386a Mon Sep 17 00:00:00 2001 From: Pepijn Over Date: Tue, 21 Jan 2014 22:50:36 +0100 Subject: [PATCH] Adding "Service" namespace under psm and moving database + template handlers --- install.php | 4 ++-- src/bootstrap.php | 4 ++-- src/psm/Module/Core.class.php | 4 ++-- src/psm/{ => Service}/Database.class.php | 4 ++-- src/psm/{ => Service}/Template.class.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/psm/{ => Service}/Database.class.php (99%) rename src/psm/{ => Service}/Template.class.php (99%) diff --git a/install.php b/install.php index 12ed24d2..3dd19100 100755 --- a/install.php +++ b/install.php @@ -34,7 +34,7 @@ if(!function_exists('curl_init')) { die('PHP is installed without the cURL module. Please install cURL first.'); } -$tpl = new psm\Template(); +$tpl = new psm\Service\Template(); $tpl->newTemplate('install', 'install.tpl.html'); @@ -148,4 +148,4 @@ foreach($tables as $name => $queries) { $tpl->addTemplateDataRepeat('install', 'tables', $result); echo $tpl->display('install'); -?> \ No newline at end of file +?> diff --git a/src/bootstrap.php b/src/bootstrap.php index 9f46d547..cf1fd295 100755 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -43,7 +43,7 @@ if(!defined('PSM_CONFIG')) { } // init db connection -$db = new psm\Database(); +$db = new psm\Service\Database(); psm_load_conf(); @@ -54,4 +54,4 @@ if(!$lang) { } psm_load_lang($lang); -?> \ No newline at end of file +?> diff --git a/src/psm/Module/Core.class.php b/src/psm/Module/Core.class.php index 32e202e7..ce16403a 100755 --- a/src/psm/Module/Core.class.php +++ b/src/psm/Module/Core.class.php @@ -69,8 +69,8 @@ abstract class Core { function __construct() { global $db; - $this->db = ($db) ? $db : new \psm\Database(); - $this->tpl = new \psm\Template(); + $this->db = ($db) ? $db : new \psm\Service\Database(); + $this->tpl = new \psm\Service\Template(); } diff --git a/src/psm/Database.class.php b/src/psm/Service/Database.class.php similarity index 99% rename from src/psm/Database.class.php rename to src/psm/Service/Database.class.php index 3e3d6e87..300c6e32 100755 --- a/src/psm/Database.class.php +++ b/src/psm/Service/Database.class.php @@ -25,7 +25,7 @@ * @link http://phpservermon.neanderthal-technology.com/ **/ -namespace psm; +namespace psm\Service; class Database { @@ -367,4 +367,4 @@ class Database { } } -?> \ No newline at end of file +?> diff --git a/src/psm/Template.class.php b/src/psm/Service/Template.class.php similarity index 99% rename from src/psm/Template.class.php rename to src/psm/Service/Template.class.php index efc63787..f67c9624 100755 --- a/src/psm/Template.class.php +++ b/src/psm/Service/Template.class.php @@ -25,7 +25,7 @@ * @link http://phpservermon.neanderthal-technology.com/ **/ -namespace psm; +namespace psm\Service; class Template { protected $output; @@ -206,4 +206,4 @@ class Template { } } -?> \ No newline at end of file +?>