X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2FBootstrap.php;h=60e06279a2e25c2bae5437813e626b84191a63a6;hb=0722c496ca63f30937427e3bf8fbdd5cfee2c83d;hp=08816c00be5d778f194331ce775dd4431f7b1691;hpb=190fd621df4920c56a422c03663874cddaa67d64;p=syj.git diff --git a/application/Bootstrap.php b/application/Bootstrap.php index 08816c0..60e0627 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -1,5 +1,5 @@ toArray()); + public function run() { Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->initView(APPLICATION_PATH . '/views/', 'Syj_View'); - parent::run(); } @@ -38,7 +34,16 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { return; } - $dirpath = implode('/', array_map('strtolower', array_slice($segments, 1, -1))); + $isinterface = false; + if (strtolower(end($segments)) == "interface") { + $isinterface = true; + array_pop($segments); + } + + $dirpath = implode(DIRECTORY_SEPARATOR, array_map('strtolower', array_slice($segments, 1, -1))); + if ($isinterface) { + $dirpath = "interface" . DIRECTORY_SEPARATOR . $dirpath; + } $filename = APPLICATION_PATH . '/' . ($dirpath ? $dirpath . '/' : '') . end($segments) . '.php'; if (Zend_Loader::isReadable($filename)) { include_once $filename; @@ -47,4 +52,3 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { } } -