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_desc = "Creates Database Tables for modules";
19 static $cli_opts = array(
25 'desc' => 'Module to Generate'
31 'desc' => 'Flag to just run database updates'
34 'update-files' => array(
39 'desc' => 'Files to update, eg. -f pman.ini -f Mtrack_wiki.php '
55 $o = PEAR::getStaticProperty('HTML_FlexyFramework', 'options');
56 if (!empty($o['cli'])) {
61 parent::getAuth(); // load company!
62 $au = $this->getAuthUser();
63 if (!$au || $au->company()->comptype != 'OWNER') {
64 $this->jerr("Not authenticated", array('authFailure' => true));
66 $this->authUser = $au;
70 function get($args,$opts = array())
75 require_once 'Pman/Builder/Generator.php';
76 ini_set('pcre.backtrack_limit', 2000000);
77 ini_set('pcre.recursion_limit', 2000000);
80 $lastarg = $this->cli ? array_pop($_SERVER['argv']) : '';
81 if (preg_match('/RunGenerator/', $lastarg)) {
84 $x = new Pman_Builder_Generator();
85 // $x->page = clone($this);
86 $x->start($this->cli, $args, $lastarg);