5 * PHP7 produces all sorts of pointless warnings... this attempts to just include all the files,
6 * so that you can view them..??
8 * would be nice to write the code to fix them.
11 require_once 'Pman.php';
13 class Pman_Core_Process_Php7 extends Pman
16 static $cli_desc = "Tests for PHP compatibilty, by including files...";
17 static $cli_opts = array();
21 if (empty($this->bootLoader->cli)) {
26 function get($base, $opts = array())
28 $dir = array($this->rootDir);
31 // $this->scan($this->rootDir, 'Pman');
35 function scan($route = array())
37 $dir = $this->rootDir . "/" . implode("/", $route);
39 echo "Looking for {$dir}\n";
41 foreach (scandir(implode('/', $dir)) as $d) {
43 if (!strlen($d) || $d[0] == '.') {
48 $this->scan(array_merge($dir, array($d)), array_merge($cls, array($d)));
52 if (!preg_match('/\.php$/', $d)) {
56 require_once implode('/', $cls) . "/" . $d;
62 // function scan($p, $pr, $path = false)
64 // $full_path = array($p, $pr);
65 // $class_path = array();
66 // if ($path !== false) {
67 // $full_path = array_merge($full_path, $path);
68 // $class_path = array_merge($class_path, $path);
70 // //print_r("CHKDIR: ". implode('/', $full_path)."\n");
72 // foreach (scandir(implode('/', $full_path)) as $d) {
74 // if (!strlen($d) || $d[0] == '.') {
80 // $clp = $class_path;
84 // //print_r("CHK: " . implode('/', $chk)."\n");
85 // // is it a file.. and .PHP...
86 // if (!is_dir(implode('/', $chk))) {
87 // if (!preg_match('/\.php$/', $d)) {
90 // $clp[] = preg_replace('/\.php$/', '', $d);
92 // //print_r("CLP: " . implode('/', $clp)."\n");
93 // require_once "Pman/" . implode('/', $clp) . '.php';
97 // // otherwise recurse...
98 // //print_r("RECURSE: " . implode('/', $clp)."\n");
100 // $this->scan($p, $pr, $clp);