Process/Php7.php
[Pman.Core] / Process / Php7.php
index cac9cf9..8733aa2 100644 (file)
@@ -26,10 +26,19 @@ class Pman_Core_Process_Php7 extends Pman
     function get($base, $opts = array()) 
     {
         set_error_handler(function ($errno, $errstr, $errfile, $errline ){
-            throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
+//            throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
+            print_r(array(
+                $errno,
+                $errstr,
+                $errfile,
+                $errline
+            ));
         });
         
-        $this->scan();
+        $this->scan(array("Pman"));
+        $this->scan(array("Hebe"));
+        
+        exit;
     }
     
     function scan($route = array()) 
@@ -53,12 +62,16 @@ class Pman_Core_Process_Php7 extends Pman
                 continue;
             }
             
-//            require_once implode('/', $route) . "/" . $d;
+            if(empty($route)){
+                continue;
+            }
             
             try {
+                
                 require_once implode('/', $route) . "/" . $d;
+                
             } catch (ErrorException $ex) {
-                echo "Unable to load configuration file.";
+                echo $ex->getMessage() . "\n";
             }
             
         }