X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=Generator.php;h=7ffeb57b856b59713a431cae841142b4762957d7;hp=a3da329068a06e2e52a07e5f2cd9cdd7f0e48dec;hb=443623f47935eb52acd65a3ff0d84eab1fd5a98b;hpb=47c875700db6751fe7056a277efcb4620b00454d diff --git a/Generator.php b/Generator.php index a3da3290..7ffeb57b 100644 --- a/Generator.php +++ b/Generator.php @@ -2,6 +2,9 @@ /** + * + * THIS HAS NOT BEEN TESTED WITH PDO yet... + * * * Generate DataObjects... * @@ -12,7 +15,7 @@ * */ -require_once 'DB/DataObject/Generator.php'; +require_once 'PDO/DataObject/Generator.php'; /** basic thing now works... @@ -42,10 +45,16 @@ $this->def['forms'][$table][$t->name] = $form; -class Pman_Core_Generator extends DB_DataObject_Generator +class Pman_Core_Generator extends PDO_DataObject_Generator { - + + function getAuth() + { + + die("do not use this directly.. - use Core/RunGenerator"); + + } // inherrited.. // $tablekeys @@ -108,6 +117,7 @@ class Pman_Core_Generator extends DB_DataObject_Generator $options['class_location'] = $this->rootDir .'/'.$proj.'/DataObjects'; $options['require_prefix'] = $proj . '/DataObjects/'; $options['class_prefix'] = $proj . '_DataObjects_'; + $this->debug(print_r($options,true)); // print_r($this);exit; @@ -155,6 +165,9 @@ class Pman_Core_Generator extends DB_DataObject_Generator continue; } foreach(scandir($options['rootDir'].'/'.$m) as $f) { + + echo "SCAN {$options['rootDir']} $f\n"; + if (!strlen($f) || $f[0] == '.') { continue; } @@ -347,6 +360,7 @@ touch Pman/????/DataObjects/".ucfirst($this->table).".php $cli = $options['cli']; foreach($this->tables as $this->table) { + $this->table = trim($this->table); $tn = strtolower($this->table); $mod = $this->modmap[$tn];