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();
+
+ exit;
}
function scan($route = array())
continue;
}
- require_once implode('/', $route) . "/" . $d;
+ if(empty($route)){
+ continue;
+ }
+
+ try {
+
+ require_once implode('/', $route) . "/" . $d;
+
+ } catch (ErrorException $ex) {
+ echo $ex->getMessage() . "\n";
+ }
}