29b2d5d15a4dd6f13500b4aa62ecd1471ef6566b
[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         $dir = array($this->rootDir);
29 //        $this->scan($this->rootDir, 'Pman');
30 //        $this->scan($this->rootDir);
31         
32         
33     }
34     
35     function scan($dir) 
36     {
37         foreach (scandir($dir) as $d) {
38             
39             if (!strlen($d) || $d[0] == '.') {
40                 continue;
41             }
42             
43             
44             
45         }
46         
47     }
48
49 //    function scan($p, $pr, $path = false) 
50 //    {
51 //        $full_path = array($p, $pr);
52 //        $class_path = array();
53 //        if ($path !== false) {
54 //            $full_path = array_merge($full_path, $path);
55 //            $class_path = array_merge($class_path, $path);
56 //        }
57 //        //print_r("CHKDIR:    ". implode('/', $full_path)."\n");
58 //
59 //        foreach (scandir(implode('/', $full_path)) as $d) {
60 //
61 //            if (!strlen($d) || $d[0] == '.') {
62 //                continue;
63 //            }
64 //            $chk = $full_path;
65 //            $chk[] = $d;
66 //
67 //            $clp = $class_path;
68 //
69 //
70 //
71 //            //print_r("CHK:          " . implode('/', $chk)."\n");
72 //            // is it a file.. and .PHP...
73 //            if (!is_dir(implode('/', $chk))) {
74 //                if (!preg_match('/\.php$/', $d)) {
75 //                    continue;
76 //                }
77 //                $clp[] = preg_replace('/\.php$/', '', $d);
78 //
79 //                //print_r("CLP:          " . implode('/', $clp)."\n");
80 //                require_once "Pman/" . implode('/', $clp) . '.php';
81 //                continue;
82 //            }
83 //            $clp[] = $d;
84 //            // otherwise recurse...
85 //            //print_r("RECURSE:        " . implode('/', $clp)."\n");
86 //
87 //            $this->scan($p, $pr, $clp);
88 //        }
89 //    }
90
91     function output() 
92     {
93         die("DONE");
94     }
95
96 }