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(
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 '
57 $o = PEAR::getStaticProperty('HTML_FlexyFramework', 'options');
58 if (!empty($o['cli'])) {
63 parent::getAuth(); // load company!
64 $au = $this->getAuthUser();
65 if (!$au || $au->company()->comptype != 'OWNER') {
66 $this->jerr("Not authenticated", array('authFailure' => true));
68 $this->authUser = $au;
72 function get($args,$opts)
77 require_once 'Pman/Builder/Generator.php';
78 ini_set('pcre.backtrack_limit', 2000000);
79 ini_set('pcre.recursion_limit', 2000000);
82 $lastarg = $this->cli ? array_pop($_SERVER['argv']) : '';
83 if (preg_match('/RunGenerator/', $lastarg)) {
86 $x = new Pman_Builder_Generator();
87 // $x->page = clone($this);
88 $x->start($this->cli, $args, $lastarg);