Adding "Service" namespace under psm and moving database + template handlers
This commit is contained in:
parent
552187c2ab
commit
59ec03f974
|
@ -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');
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @link http://phpservermon.neanderthal-technology.com/
|
||||
**/
|
||||
|
||||
namespace psm;
|
||||
namespace psm\Service;
|
||||
|
||||
class Database {
|
||||
|
||||
|
@ -367,4 +367,4 @@ class Database {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Loading…
Reference in New Issue