$proj = 'pman'; //ucfirst(basename($options['database']));
// we are going to generate all of the code into a temporay foldler..
- $options['rootDir'] = ini_get('session.save_path').'/temp_'. $proj;
+ $user = posix_getpwuid(posix_getuid());
+
+ $options['rootDir'] = ini_get('session.save_path').'/temp_'. $proj.'_'. $user['name'];
$options['cli'] = $cli;
$options['mods'] = empty($mods) ? array() : explode('/',$mods);
require_once 'System.php';
$cat = System::which('cat');
$mysql = System::which('mysql');
- print_r($options['mods'] );
+ //print_r($ff);
+ //print_r($options['mods'] );
foreach($this->modsql as $m => $fl)
{
if ($cli && isset($options['database_'. $m])) {
$this->scanModules();
}
$options = &PEAR::getStaticProperty('DB_DataObject','options');
+ $builder_options = PEAR::getStaticProperty('Pman_Builder','options');
+ $ignore = empty($builder_options['skip_tables']) ? array() : $builder_options['skip_tables'];
+
$mods = $options['mods'];
$inis = array();
$this->_newConfig = '';
$tn = strtolower($this->table);
//print_r($this->modmap);//[$tn]);//
+
+
+
if (!isset($this->modmap[$tn])) {
- die("No existing DataObject file found for table {$this->table} \n".
- "- create an empty file in the related Module/DataObjects directory
- eg.
- touch Pman/????/DataObjects/".ucfirst($this->table).".php
- \n");
+
+ if (in_array($this->table, $ignore)) {
+ continue;
+ }
+
+
+ die("No existing DataObject file found for table {$this->table}
+
+- either add it to Pman_Builder[skip_tables] or\n
+- create an empty file in the related Module/DataObjects directory
+eg.
+touch Pman/????/DataObjects/".ucfirst($this->table).".php
+
+");
}
$mod = $this->modmap[$tn];
// function generateClasses() { }
var $jsHeader = "//<script type=\"text/javascript\">\n";
-
+ /**
+ *
+ * generate the reader tables..
+ * I'm not sure if this is needed any more, as our desktop builder
+ * generates that data anyway.
+ *
+ */
function generateRoo()
{
-
+
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$mods = $options['mods'];
$this->rootDir = $options['rootDir'];
function _generateReaders($m)
{
-
- $udb = ucfirst($this->_database);
+ $ff = HTML_FlexyFramework::get();
+
$ret = $this->jsHeader;
$j = new Pman_Builder_Generator_JSON();
$j->indent = 0;
}
}
$this->readersArgs[$this->table]['xtype'] = 'JsonReader';
- $ret.="\n$udb.Readers.$utable = ";
+ $ret.="\n{$ff->project}.Readers.$utable = ";
$x = $j->encodeUnsafe($this->readersArgs[$this->table]);
$ret .= trim(substr($x, 0, -1)) . ",\n"; // strip of trailing ;};
$ret .= $j->tab . "fields : [\n". $j->tab.$j->tab;