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 = "Update SQL or Generate DataObjects";
20 $ff = HTML_FlexyFramework::get();
21 if (!empty($ff->cli)) {
26 parent::getAuth(); // load company!
27 $au = $this->getAuthUser();
28 if (!$au || $au->company()->comptype != 'OWNER') {
29 $this->jerr("Not authenticated", array('authFailure' => true));
31 $this->authUser = $au;
37 require_once 'Pman/Core/Generator.php';
38 ini_set('pcre.backtrack_limit', 2000000);
39 ini_set('pcre.recursion_limit', 2000000);
42 $lastarg = $this->cli ? array_pop($_SERVER['argv']) : '';
43 if (preg_match('/RunGenerator/', $lastarg)) {
46 $x = new Pman_Core_Generator();
47 // $x->page = clone($this);
48 $x->start($this->cli, $args, $lastarg);
50 // technically it would be good to trash the cached ini files here..
51 // however we can not really do that, as the ownships are off..
52 //we can however regen our own files..
53 HTML_FlexyFramework::get()->generateDataobjectsCache(true);