From: Edward Date: Wed, 21 Nov 2018 08:37:58 +0000 (+0800) Subject: Process/Php7.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=075677501e7a91cfcd087ea0b306525c27b414d8 Process/Php7.php --- diff --git a/Process/Php7.php b/Process/Php7.php index 4ca0824b..4dea8bc7 100644 --- a/Process/Php7.php +++ b/Process/Php7.php @@ -26,10 +26,14 @@ class Pman_Core_Process_Php7 extends Pman function get($base, $opts = array()) { // $this->scan($this->rootDir, 'Pman'); - $this->scan($this->rootDir); +// $this->scan($this->rootDir); + + foreach (scandir($this->rootDir) as $d) { + echo "{$d}\n"; + } } - - function scan($p, $pr, $path = false) + + function scan($dir) { $full_path = array($p, $pr); $class_path = array(); @@ -71,6 +75,48 @@ class Pman_Core_Process_Php7 extends Pman } } +// function scan($p, $pr, $path = false) +// { +// $full_path = array($p, $pr); +// $class_path = array(); +// if ($path !== false) { +// $full_path = array_merge($full_path, $path); +// $class_path = array_merge($class_path, $path); +// } +// //print_r("CHKDIR: ". implode('/', $full_path)."\n"); +// +// foreach (scandir(implode('/', $full_path)) as $d) { +// +// if (!strlen($d) || $d[0] == '.') { +// continue; +// } +// $chk = $full_path; +// $chk[] = $d; +// +// $clp = $class_path; +// +// +// +// //print_r("CHK: " . implode('/', $chk)."\n"); +// // is it a file.. and .PHP... +// if (!is_dir(implode('/', $chk))) { +// if (!preg_match('/\.php$/', $d)) { +// continue; +// } +// $clp[] = preg_replace('/\.php$/', '', $d); +// +// //print_r("CLP: " . implode('/', $clp)."\n"); +// require_once "Pman/" . implode('/', $clp) . '.php'; +// continue; +// } +// $clp[] = $d; +// // otherwise recurse... +// //print_r("RECURSE: " . implode('/', $clp)."\n"); +// +// $this->scan($p, $pr, $clp); +// } +// } + function output() { die("DONE");