more quote identeiifers fixessss
[Pman.Core] / Process / Php7.php
index 8d7de88..608107d 100644 (file)
@@ -29,12 +29,14 @@ class Pman_Core_Process_Php7 extends Pman
 //            throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
             print_r(array(
                 $errno,
+                $errstr,
                 $errfile,
                 $errline
             ));
         });
         
-        $this->scan();
+        $this->scan(array("Pman"));
+        $this->scan(array($this->bootLoader->project));
         
         exit;
     }
@@ -43,15 +45,13 @@ class Pman_Core_Process_Php7 extends Pman
     {
         $dir = $this->rootDir . "/" . implode("/", $route);
         
-        echo "Looking for {$dir}\n";
-        
         foreach (scandir($dir) as $d) {
             
             if (!strlen($d) || $d[0] == '.') {
                 continue;
             }
             
-            if (is_dir($d)) {
+            if (is_dir("{$dir}/{$d}")) {
                 $this->scan(array_merge($route, array($d)));
                 continue;
             }
@@ -62,13 +62,7 @@ class Pman_Core_Process_Php7 extends Pman
             
             try {
                 
-                $cls = $d;
-                
-                if(!empty($route)){
-                    $cls = implode('/', $route) . "/" . $d;
-                }
-                
-                require_once $cls;
+                require_once implode('/', $route) . "/" . $d;
                 
             } catch (ErrorException $ex) {
                 echo $ex->getMessage() . "\n";
@@ -77,49 +71,7 @@ class Pman_Core_Process_Php7 extends Pman
         }
         
     }
-
-//    function scan($p, $pr, $path = false) 
-//    {
-//        $full_path = array($p, $pr);
-//        $class_path = array();
-//        if ($path !== false) {
-//            $full_path = array_merge($full_path, $path);
-//            $class_path = array_merge($class_path, $path);
-//        }
-//        //print_r("CHKDIR:    ". implode('/', $full_path)."\n");
-//
-//        foreach (scandir(implode('/', $full_path)) as $d) {
-//
-//            if (!strlen($d) || $d[0] == '.') {
-//                continue;
-//            }
-//            $chk = $full_path;
-//            $chk[] = $d;
-//
-//            $clp = $class_path;
-//
-//
-//
-//            //print_r("CHK:          " . implode('/', $chk)."\n");
-//            // is it a file.. and .PHP...
-//            if (!is_dir(implode('/', $chk))) {
-//                if (!preg_match('/\.php$/', $d)) {
-//                    continue;
-//                }
-//                $clp[] = preg_replace('/\.php$/', '', $d);
-//
-//                //print_r("CLP:          " . implode('/', $clp)."\n");
-//                require_once "Pman/" . implode('/', $clp) . '.php';
-//                continue;
-//            }
-//            $clp[] = $d;
-//            // otherwise recurse...
-//            //print_r("RECURSE:        " . implode('/', $clp)."\n");
-//
-//            $this->scan($p, $pr, $clp);
-//        }
-//    }
-
+    
     function output() 
     {
         die("DONE");