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 require_once 'Pman/Core/Generator.php';
57 ini_set('pcre.backtrack_limit', 2000000);
58 ini_set('pcre.recursion_limit', 2000000);
61 $lastarg = $this->cli ? array_pop($_SERVER['argv']) : '';
62 if (preg_match('/RunGenerator/', $lastarg)) {
65 $x = new Pman_Core_Generator();
66 // $x->page = clone($this);
67 $x->start($this->cli, $args, $lastarg);
69 // technically it would be good to trash the cached ini files here..
70 // however we can not really do that, as the ownships are off..
71 //we can however regen our own files..
72 HTML_FlexyFramework::get()->generateDataobjectsCache(true);