Process/Php7.php
[Pman.Core] / Process / Php7.php
1 <?php
2
3 /**
4  *
5  * PHP7 produces all sorts of pointless warnings... this attempts to just include all the files,
6  * so that you can view them..??
7  *
8  * would be nice to write the code to fix them.
9  *
10  */
11
12 class Pman_Core_Php7 extends Pman
13 {
14     
15     static $cli_desc = "Tests for PHP compatibilty, by including files..."; 
16     
17     
18     
19     function getAuth()
20     {
21         if (empty($this->cli)) {
22             die("CLI only");
23         }
24     }
25     
26     function cliHelpSearch($p,$pr, $path=false) {
27         
28         
29         
30         $full_path = array($p,$pr);
31         $class_path = array();
32         if ($path !== false)  {
33             $full_path= array_merge($full_path, $path);
34             $class_path = array_merge($class_path, $path);
35         }
36         //print_r("CHKDIR:    ". implode('/', $full_path)."\n");
37         
38         foreach(scandir(implode('/', $full_path)) as $d) {
39             
40             if (!strlen($d) || $d[0] == '.') {
41                 continue;
42             }
43             $chk = $full_path;
44             $chk[] = $d;
45             
46             $clp = $class_path;
47             
48             
49             
50             //print_r("CHK:          " . implode('/', $chk)."\n");
51             // is it a file.. and .PHP...
52             if (!is_dir(implode('/', $chk))) {
53                 if (!preg_match('/\.php$/',$d)) {
54                     continue;
55                 }
56                 $clp[] = preg_replace('/\.php$/','', $d);
57                 
58                 //print_r("CLP:          " . implode('/', $clp)."\n");
59                 var_dump(implode('/', $clp ));
60                 continue;
61             }
62             $clp[] = $d;
63             // otherwise recurse...
64             //print_r("RECURSE:        " . implode('/', $clp)."\n");
65             
66             $this->cliHelpSearch($p,$pr, $clp);
67         }
68     
69     
70     
71 }