$cli = $options['cli'];
foreach($this->tables as $this->table) {
+
$this->table = trim($this->table);
$tn = strtolower($this->table);
$mod = $this->modmap[$tn];
continue;
}
+ $clean_table = preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));
- $this->classname = 'Pman_'.$mod . '_DataObjects_'. preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));; // replace odd chars?
+ $this->classname = 'Pman_'.$mod . '_DataObjects_'. $clean_table; // replace odd chars?
- $outfilename = $rd.'/'.$mod.'/'. ucfirst($this->table).'.php';
- $orig = $ff->page->rootDir .'/Pman/'.$mod.'/DataObjects/'. ucfirst($this->table).'.php';
+ $outfilename = $rd.'/'.$mod.'/'. $clean_table .'.php';
+ $orig = $ff->page->rootDir .'/Pman/'.$mod.'/DataObjects/'. $clean_table.'.php';
// file_get_contents???