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 require_once 'Pman.php';
12
13 class Pman_Core_Process_Php7 extends Pman 
14 {
15
16     static $cli_desc = "Tests for PHP compatibilty, by including files...";
17     static $cli_opts = array();
18
19     function getAuth() 
20     {
21         if (empty($this->bootLoader->cli)) {
22             die("CLI only");
23         }
24     }
25
26     function get($base, $opts = array()) 
27     {
28 //        $this->scan($this->rootDir, 'Pman');
29 //        $this->scan($this->rootDir);
30         
31         
32     }
33     
34     function scan($dir) 
35     {
36         foreach (scandir($dir) as $d) {
37             
38             if (!strlen($d) || $d[0] == '.') {
39                 continue;
40             }
41             
42             
43             
44         }
45         
46     }
47
48 //    function scan($p, $pr, $path = false) 
49 //    {
50 //        $full_path = array($p, $pr);
51 //        $class_path = array();
52 //        if ($path !== false) {
53 //            $full_path = array_merge($full_path, $path);
54 //            $class_path = array_merge($class_path, $path);
55 //        }
56 //        //print_r("CHKDIR:    ". implode('/', $full_path)."\n");
57 //
58 //        foreach (scandir(implode('/', $full_path)) as $d) {
59 //
60 //            if (!strlen($d) || $d[0] == '.') {
61 //                continue;
62 //            }
63 //            $chk = $full_path;
64 //            $chk[] = $d;
65 //
66 //            $clp = $class_path;
67 //
68 //
69 //
70 //            //print_r("CHK:          " . implode('/', $chk)."\n");
71 //            // is it a file.. and .PHP...
72 //            if (!is_dir(implode('/', $chk))) {
73 //                if (!preg_match('/\.php$/', $d)) {
74 //                    continue;
75 //                }
76 //                $clp[] = preg_replace('/\.php$/', '', $d);
77 //
78 //                //print_r("CLP:          " . implode('/', $clp)."\n");
79 //                require_once "Pman/" . implode('/', $clp) . '.php';
80 //                continue;
81 //            }
82 //            $clp[] = $d;
83 //            // otherwise recurse...
84 //            //print_r("RECURSE:        " . implode('/', $clp)."\n");
85 //
86 //            $this->scan($p, $pr, $clp);
87 //        }
88 //    }
89
90     function output() 
91     {
92         die("DONE");
93     }
94
95 }