Adding "Service" namespace under psm and moving database + template handlers

This commit is contained in:
Pepijn Over 2014-01-21 22:50:36 +01:00
parent 552187c2ab
commit 59ec03f974
5 changed files with 10 additions and 10 deletions

View File

@ -34,7 +34,7 @@ if(!function_exists('curl_init')) {
die('PHP is installed without the cURL module. Please install cURL first.'); 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'); $tpl->newTemplate('install', 'install.tpl.html');
@ -148,4 +148,4 @@ foreach($tables as $name => $queries) {
$tpl->addTemplateDataRepeat('install', 'tables', $result); $tpl->addTemplateDataRepeat('install', 'tables', $result);
echo $tpl->display('install'); echo $tpl->display('install');
?> ?>

View File

@ -43,7 +43,7 @@ if(!defined('PSM_CONFIG')) {
} }
// init db connection // init db connection
$db = new psm\Database(); $db = new psm\Service\Database();
psm_load_conf(); psm_load_conf();
@ -54,4 +54,4 @@ if(!$lang) {
} }
psm_load_lang($lang); psm_load_lang($lang);
?> ?>

View File

@ -69,8 +69,8 @@ abstract class Core {
function __construct() { function __construct() {
global $db; global $db;
$this->db = ($db) ? $db : new \psm\Database(); $this->db = ($db) ? $db : new \psm\Service\Database();
$this->tpl = new \psm\Template(); $this->tpl = new \psm\Service\Template();
} }

View File

@ -25,7 +25,7 @@
* @link http://phpservermon.neanderthal-technology.com/ * @link http://phpservermon.neanderthal-technology.com/
**/ **/
namespace psm; namespace psm\Service;
class Database { class Database {
@ -367,4 +367,4 @@ class Database {
} }
} }
?> ?>

View File

@ -25,7 +25,7 @@
* @link http://phpservermon.neanderthal-technology.com/ * @link http://phpservermon.neanderthal-technology.com/
**/ **/
namespace psm; namespace psm\Service;
class Template { class Template {
protected $output; protected $output;
@ -206,4 +206,4 @@ class Template {
} }
} }
?> ?>