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_Core_RunGenerator extends Pman
14 static $cli_desc = "Generate DataObjects (runs updatedatabase first)";
16 static $cli_opts = array(
25 'desc' => 'Files to Overwrite',
39 $ff = HTML_FlexyFramework::get();
40 if (!empty($ff->cli)) {
45 parent::getAuth(); // load company!
46 $au = $this->getAuthUser();
47 if (!$au || $au->company()->comptype != 'OWNER') {
48 $this->jerr("Not authenticated", array('authFailure' => true));
50 $this->authUser = $au;
56 HTML_FlexyFramework::run('Core/UpdateDatabase');
58 die("running generator")
60 require_once 'Pman/Core/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_Core_Generator();
70 // $x->page = clone($this);
71 $x->start($this->cli, $args, $lastarg);
73 // technically it would be good to trash the cached ini files here..
74 // however we can not really do that, as the ownships are off..
75 //we can however regen our own files..
76 HTML_FlexyFramework::get()->generateDataobjectsCache(true);