]> dev.renevier.net Git - syj.git/blobdiff - application/Bootstrap.php
routes profile
[syj.git] / application / Bootstrap.php
index 60e06279a2e25c2bae5437813e626b84191a63a6..0d0d4cf36664fc9f71200b1c7d3b42d5203c1596 100644 (file)
@@ -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();
@@ -30,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;
             }