Replace if block with switch case for extensibility
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user