Generator.php
authorAlan Knowles <alan@akbkhome.com>
Fri, 14 Oct 2011 05:38:02 +0000 (13:38 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 14 Oct 2011 05:38:02 +0000 (13:38 +0800)
Generator.php

index 960c86c..19c9d00 100644 (file)
@@ -356,7 +356,7 @@ touch Pman/????/DataObjects/".ucfirst($this->table).".php
             }
             
             
-            $this->classname    = 'Pman_'.$mod . '_DataObjects_'. ucfirst($this->table); // replace odd chars?
+            $this->classname    = 'Pman_'.$mod . '_DataObjects_'. preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));; // replace odd chars?
            
            
             $outfilename    = $rd.'/'.$mod.'/'. ucfirst($this->table).'.php';