X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2FBootstrap.php;h=0d0d4cf36664fc9f71200b1c7d3b42d5203c1596;hp=a8bc3a66e91d07ab3daa2ac79780c5bb2af9067d;hb=00c2579ade64a20ba2d82e98d3eea5f864864cdb;hpb=1f6105289a49079809c2a4677b561bc82c62db88 diff --git a/application/Bootstrap.php b/application/Bootstrap.php index a8bc3a6..0d0d4cf 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -3,7 +3,7 @@ and is published under the AGPL license. */ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { - protected static $libns = array('gisconverter', 'phptojs', 'pwdgen'); + protected static $libns = array('gisconverter', 'phptojs', 'pwdgen', 'alti'); public function _bootstrap($resource = null) { $autoloader = Zend_Loader_Autoloader::getInstance(); @@ -15,10 +15,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { } 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'); - parent::run(); } @@ -33,6 +30,18 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { if (strpos ($class, "Syj_") === 0) { $segments = explode ('_', $class); + if (count($segments) < 2) { + return; + } + + if (count($segments) == 2) { + $filename = APPLICATION_PATH . '/' . end($segments) . '.php'; + if (Zend_Loader::isReadable($filename)) { + include_once $filename; + } + return; + } + if (count($segments) < 3) { return; }