5 * this is technically a cli wrapper for the generator..
7 * we will test it on the web initially..
11 require_once 'Pman.php';
13 class Pman_Core_RefreshDatabaseCache extends Pman
15 static $cli_desc = "Refresh the database schema cache";
20 if($_SERVER['HTTP_HOST'] == 'localhost'){
24 $ff = HTML_FlexyFramework::get();
25 if (!empty($ff->cli)) {
29 parent::getAuth(); // load company!
30 $au = $this->getAuthUser();
31 if (!$au || $au->company()->comptype != 'OWNER') {
32 $this->jerr("Not authenticated", array('authFailure' => true));
34 $this->authUser = $au;
40 function get($args, $opts=array())
42 //print_r($opts);exit;
45 // technically it would be good to trash the cached ini files here..
46 // however we can not really do that, as the ownships are off..
47 //we can however regen our own files..
48 //DB_DataObject::debugLevel(1);
49 //HTML_FlexyFramework::get()->debug = 1;
51 HTML_FlexyFramework::get()->generateDataobjectsCache(true);