<?php
/*
-Help file for cli in this directory.
-
+
*/
-class Pman_Core_Cli
+class Pman_Core_Cli extends Pman
{
+ static $cli_desc = "Base class for CLI only commands";
function getAuth()
{
- return false;
+ $ff = HTML_FlexyFramework::get();
+ if (!$ff->cli) {
+ die("CLI ONLY");
+ }
}
- function help($cli)
+ function get()
{
- echo "
-
- $cli Core/RunGenerator
-
- Creates ALL database tables
- - does not change files, just shows you want would happen
-
-
- $cli Core/RunGenerator/COMPONENT
-
- Runs the generator for a COMPONENT (NOTE - will update that COMPONENT sql)
- - does not change files, just shows you want would happen
-
-
- $cli Core/RunGenerator/COMPONENT pman.ini,COMPONENT.readers.js,...
- $cli Core/RunGenerator/COMPONENT _all_
- Runs the generator for a project (NOTE - runs all the SQL updates)
- - Changes the files.
-
-
-================================
-
- $cli Core/JsCompile build PROJECT
-
- Runs the javascript compiler - merging all the JS files so the load faster.
- Note: cfg option Pman_Builder['jspacker'] must be set to location of jstoolkit code
-
-================================
-
- $cli Core/Notify
-
- Runs the notification tool - should be run every minute ideally.
- Sends out emails to anyone in the notification list.
-
- /etc/cron.d/pman-core-notify
- * * * * * www-data /usr/bin/php /home/gitlive/web.mtrack/admin.php Core/Notify > /dev/null
-
-
-";
-
-
+ die("this is only used as a base class for Cli based commands - extend to use.");
}
-
}
\ No newline at end of file
class Pman_Core_JsCompile extends Pman
{
- static $cli_desc = "Wrapper around Javascript compression tools";
+ static $cli_desc = "Wrapper around Javascript compression tools
+ Runs the javascript compiler - merging all the JS files so the load faster.
+ Note: cfg option Pman_Builder['jspacker'] must be set to location of jstoolkit code
+";
var $cli = false;
function getAuth()
class Pman_Core_Notify extends Pman
{
- static $cli_desc = "Send out notification emails (usually from cron)";
+ static $cli_desc = "Runs the notification queue (usually from cron)
+ Normally used to sends out emails to anyone in the notification list.
+
+ /etc/cron.d/pman-core-notify
+ * * * * * www-data /usr/bin/php /home/gitlive/web.mtrack/admin.php Core/Notify > /dev/null
+
+";
static $cli_opts = array(
'debug' => array(
},
/**
* Depreciated - USE new Pman.Request
- *
+ * We need to replace all the uses with this, however the api is slightly different,
+ * the success argument is res.data, not res..
*
*/
request : function(c) {
- return new Pman.Request(c);
- /*
-
+ //return new Pman.Request(c);
+
var r= new Roo.data.Connection({
timeout : typeof(c.timeout) == 'undefined' ? 30000 : c.timeout
});
scope: this
});
- */
+
},
require_once 'Pman.php';
class Pman_Core_RunGenerator extends Pman
{
- static $cli_desc = "Generate DataObjects (runs updatedatabase first)";
-
+ static $cli_desc = "Generate DataObjects (runs updatedatabase first)
+ does not change files, just shows you want would happen";
+
+
static $cli_opts = array(
'module' => array(
'desc' => 'Module (if new tables are found, they will be put in the modules database directory',