Replace if block with switch case for extensibility

This commit is contained in:
2011-08-06 14:55:29 +01:00
parent 9697654594
commit b93efc9878

View File

@@ -16,7 +16,8 @@ class RippingCluster_Main extends SihnonFramework_Main {
$this->request = new RippingCluster_RequestParser($request_string);
if (HBC_File == 'index') {
switch (HBC_File) {
case 'index': {
$this->smarty = new Smarty();
$this->smarty->template_dir = './source/templates';
$this->smarty->compile_dir = './tmp/templates';
@@ -29,6 +30,8 @@ class RippingCluster_Main extends SihnonFramework_Main {
$this->smarty->assign('messages', array());
$this->smarty->assign('base_uri', $this->base_uri);
} break;
}
}