X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2FBootstrap.php;h=36471f3c38c3c159991fe184a0a134a1cc4dda20;hp=5da7d3e218aa93533a938652c4da1edecfe43c38;hb=c1aeb7538786d8c9f3b3337c0b71e21ef89d9c77;hpb=69cbaf628f5576754d4553c021315188e22d24af diff --git a/application/Bootstrap.php b/application/Bootstrap.php index 5da7d3e..36471f3 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -14,8 +14,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { parent::_bootstrap($resource); } - public function run() - { + public function run() { $sessionConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/session.ini', APPLICATION_ENV); Zend_Session::setOptions($sessionConfig->toArray()); Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->initView(APPLICATION_PATH . '/views/', 'Syj_View'); @@ -38,7 +37,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;