RefreshDatabaseCache.php
[Pman.Core] / RefreshDatabaseCache.php
1 <?php
2
3 /**
4  * 
5  * this is technically a cli wrapper for the generator..
6  * 
7  * we will test it on the web initially..
8  * 
9  * 
10  */
11 require_once 'Pman.php';
12 class Pman_Core_RefreshDatabaseCache extends Pman
13 {     
14     static $cli_desc = "Refresh the database schema cache";
15    
16     var $cli = false;
17     function getAuth() {
18         
19         
20         $ff = HTML_FlexyFramework::get();
21         if (!empty($ff->cli)) {
22             $this->cli = true;
23             return true;
24         }
25         die("cli only"); 
26     }
27      
28     function get($args, $opts)
29     {
30         //print_r($opts);exit;
31         
32         
33         // technically it would be good to trash the cached ini files here.. 
34         // however we can not really do that, as the ownships are off..
35         //we can however regen our own files..
36         HTML_FlexyFramework::get()->generateDataobjectsCache(true);
37         
38         die("done!");
39     }
40     
41 }