Process/Php7.php
[Pman.Core] / Process / Php7.php
index a8b224b..173d1de 100644 (file)
@@ -22,13 +22,19 @@ class Pman_Core_Process_Php7 extends Pman
             die("CLI only");
         }
     }
-
+    
     function get($base, $opts = array()) 
     {
-        $dir = array($this->rootDir);
-        $cls = array();
+        set_error_handler(function ($errno, $errstr, $errfile, $errline ){
+//            throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
+            print_r(array(
+                $errno,
+                $errstr,
+                $errfile,
+                $errline
+            ));
+        });
         
-//        $this->scan($this->rootDir, 'Pman');
         $this->scan();
     }
     
@@ -53,7 +59,18 @@ class Pman_Core_Process_Php7 extends Pman
                 continue;
             }
             
-            require_once implode('/', $route) . "/" . $d;
+            try {
+                
+                if(!empty($route)){
+                    require_once implode('/', $route) . "/" . $d;
+                    continue;
+                }
+                
+                require_once $d;
+                
+            } catch (ErrorException $ex) {
+                echo $ex->getMessage() . "\n";
+            }
             
         }