5 * this is technically a cli wrapper for the generator..
7 * we will test it on the web initially..
11 require_once 'Pman.php';
12 class Pman_Builder_RunGenerator extends Pman
17 static $cli_description = "Creates Database Tables for modules"
19 static $cli_opts = array(
24 //'default' => 0, -- no default if it is required..
25 'desc' => 'A test argument that has to be set..'
43 $o = PEAR::getStaticProperty('HTML_FlexyFramework', 'options');
44 if (!empty($o['cli'])) {
49 parent::getAuth(); // load company!
50 $au = $this->getAuthUser();
51 if (!$au || $au->company()->comptype != 'OWNER') {
52 $this->jerr("Not authenticated", array('authFailure' => true));
54 $this->authUser = $au;
60 require_once 'Pman/Builder/Generator.php';
61 ini_set('pcre.backtrack_limit', 2000000);
62 ini_set('pcre.recursion_limit', 2000000);
65 $lastarg = $this->cli ? array_pop($_SERVER['argv']) : '';
66 if (preg_match('/RunGenerator/', $lastarg)) {
69 $x = new Pman_Builder_Generator();
70 // $x->page = clone($this);
71 $x->start($this->cli, $args, $lastarg);