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
18 $ff = HTML_FlexyFramework::get();
19 if (!empty($ff->cli)) {
24 parent::getAuth(); // load company!
25 $au = $this->getAuthUser();
26 if (!$au || $au->company()->comptype != 'OWNER') {
27 $this->jerr("Not authenticated", array('authFailure' => true));
29 $this->authUser = $au;
35 require_once 'Pman/Core/Generator.php';
36 ini_set('pcre.backtrack_limit', 2000000);
37 ini_set('pcre.recursion_limit', 2000000);
40 $lastarg = $this->cli ? array_pop($_SERVER['argv']) : '';
41 if (preg_match('/RunGenerator/', $lastarg)) {
44 $x = new Pman_Core_Generator();
45 // $x->page = clone($this);
46 $x->start($this->cli, $args, $lastarg);
48 // technically it would be good to trash the cached ini files here..
49 // however we can not really do that, as the ownships are off..
50 //we can however regen our own files..
51 HTML_FlexyFramework::get()->generateDataobjectsCache(true);