Process/Php7.php
[Pman.Core] / Process / Php7.php
index dff9646..45f225d 100644 (file)
@@ -22,13 +22,9 @@ class Pman_Core_Process_Php7 extends Pman
             die("CLI only");
         }
     }
-
+    
     function get($base, $opts = array()) 
     {
-        $dir = array($this->rootDir);
-        $cls = array();
-        
-//        $this->scan($this->rootDir, 'Pman');
         $this->scan();
     }
     
@@ -38,14 +34,14 @@ class Pman_Core_Process_Php7 extends Pman
         
         echo "Looking for {$dir}\n";
         
-        foreach (scandir(implode('/', $dir)) as $d) {
+        foreach (scandir($dir) as $d) {
             
             if (!strlen($d) || $d[0] == '.') {
                 continue;
             }
             
             if (is_dir($d)) {
-                $this->scan(array_merge($dir, array($d)), array_merge($cls, array($d)));
+                $this->scan(array_merge($route, array($d)));
                 continue;
             }
             
@@ -53,7 +49,13 @@ class Pman_Core_Process_Php7 extends Pman
                 continue;
             }
             
-            require_once implode('/', $cls) . "/" . $d;
+//            require_once implode('/', $route) . "/" . $d;
+            
+            try {
+                require_once implode('/', $route) . "/" . $d;
+            } catch (ErrorException $ex) {
+                echo "Unable to load configuration file.";
+            }
             
         }