当前位置: 首页>>代码示例>>PHP>>正文


PHP CLI::taskDescription方法代码示例

本文整理汇总了PHP中CLI::taskDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP CLI::taskDescription方法的具体用法?PHP CLI::taskDescription怎么用?PHP CLI::taskDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CLI的用法示例。


在下文中一共展示了CLI::taskDescription方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: minify_javascript

 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @author Alexandre Rosenfeld <alexandre@colosa.com>
 * @package workflow-engine-bin-tasks
 */

CLI::taskName('build-js');
CLI::taskDescription(<<<EOT
    Generate Javascript Files

    This command should be run after any modification of javascript files in
    folder gulliver/js/*.
EOT
);
//CLI::taskOpt("minify", "If the option is enabled, performs the build only with minified files", "min", "buildmin");
CLI::taskRun("minify_javascript");

function minify_javascript($command, $args)
{
    CLI::logging("BUILD-JS\n");
    //disabling the rakefile version, until we have updated the dev environment
    //CLI::logging("Checking if rake is installed...\n");
    //$rakeFile = PROCESSMAKER_PATH . "workflow/engine/bin/tasks/Rakefile";
    //system('rake -f ' . $rakeFile);

    require_once (PATH_THIRDPARTY . 'jsmin/jsmin.php');
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:cliRake.php

示例2:

CLI::taskRun("runStructureDirectories");



CLI::taskName("database-generate-self-service-by-value");

CLI::taskDescription(<<<EOT

  Generate or upgrade the table "self-service by value".



  This command populate the table "self-service by value", this for the cases when

  a task it's defined with "Self Service Value Based Assignment" in "Assignment Rules".



  If no workspace is specified, the command will be run in all workspaces. More

  than one workspace can be specified.

EOT

);

CLI::taskArg("workspace-name", true, true);

CLI::taskRun("run_database_generate_self_service_by_value");

开发者ID:hpx2206,项目名称:processmaker-1,代码行数:29,代码来源:cliWorkspaces.php

示例3: run_flush_cache

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @package workflow-engine-bin-tasks
 */
G::LoadSystem("g");

CLI::taskName('flush-cache');
CLI::taskDescription(<<<EOT
    Flush cache of all workspaces of a given workspace
EOT
);

CLI::taskArg('workspace', true, true);
CLI::taskRun('run_flush_cache');

function run_flush_cache($args, $opts)
{
    $rootDir = realpath(__DIR__."/../../../../");
    $app = new Maveriks\WebApplication();
    $app->setRootDir($rootDir);
    $loadConstants = false;
    $workspaces = get_workspaces_from_args($args);

    if (! defined("PATH_C")) {
        die("ERROR: seems processmaker is not properly installed (System constants are missing).".PHP_EOL);
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:32,代码来源:cliFlushCache.php

示例4: run_create_translation

 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @package workflow-engine-bin-tasks
 */
G::LoadClass("system");
G::LoadClass("wsTools");


CLI::taskName('mafe-translation');
CLI::taskDescription(<<<EOT
    Creates labels of mafe for the database 

EOT
);

CLI::taskArg('workspace', true, true);
CLI::taskOpt("lang", "languaje", "l:","lang=");
CLI::taskRun('run_create_translation');

function run_create_translation($args, $opts)
{
    G::LoadSystem('inputfilter');
    $filter = new InputFilter();
    $opts = $filter->xssFilterHard($opts);
    $args = $filter->xssFilterHard($args);
    $rootDir = realpath(__DIR__."/../../../../");
    $app = new Maveriks\WebApplication();
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:cliMafe.php

示例5: run_create_translation

 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @package workflow-engine-bin-tasks
 */
G::LoadClass("system");
G::LoadClass("wsTools");
CLI::taskName('mafe-translation');
CLI::taskDescription(<<<EOT
    Creates labels of mafe for the database

    If no workspace is specified, then the translation labels will be created in all available workspaces.
EOT
);
CLI::taskArg('workspace', true, true);
CLI::taskOpt("lang", "Specify the language to create the translation labels. If not specified then the language will be 'en' (English) by default.\n        Ex: -lfr (French)\n        Ex: --lang=zh-CN (Mainland Chinese)", "lLANG", "lang=LANG");
CLI::taskRun('run_create_translation');
function run_create_translation($args, $opts)
{
    G::LoadSystem('inputfilter');
    $filter = new InputFilter();
    $opts = $filter->xssFilterHard($opts);
    $args = $filter->xssFilterHard($args);
    $rootDir = realpath(__DIR__ . "/../../../../");
    $app = new Maveriks\WebApplication();
    $app->setRootDir($rootDir);
    $loadConstants = false;
开发者ID:emildev35,项目名称:processmaker,代码行数:32,代码来源:cliMafe.php

示例6: workspace

  Upgrade or repair translations for the specified workspace(s).

  If no workspace is specified, the command will be run in all workspaces. More
  than one workspace can be specified.

  This command will go through each language installed in ProcessMaker and
  update this workspace translations to match the current version of
  ProcessMaker.
EOT
);
CLI::taskArg('workspace-name', true, true);
CLI::taskRun(run_translation_upgrade);
CLI::taskName('migrate-cases-folders');
CLI::taskDescription(<<<EOT
  Migrating cases folders of the workspaces

  Specify the WORKSPACE to migrate from a existing workspace.
EOT
);
//CLI::taskArg('workspace', true);
CLI::taskOpt("workspace", "Select which workspace to migrate the cases folders, if multiple workspaces are present in the server.", "w:", "workspace=");
CLI::taskRun(runStructureDirectories);
/**
 * Function run_info
 * access public
 */
function run_info($args, $opts)
{
    $workspaces = get_workspaces_from_args($args);
    workspaceTools::printSysInfo();
    foreach ($workspaces as $workspace) {
        echo "\n";
开发者ID:bqevin,项目名称:processmaker,代码行数:32,代码来源:cliWorkspaces.php

示例7: run_info

  Upgrading a workspace will make it correspond to the current version of
  ProcessMaker.

  Use this command to upgrade workspaces individually, otherwise use the
  upgrade command to upgrade the entire system.
EOT
);
CLI::taskArg('workspace-name', true, true);
CLI::taskRun(run_workspace_upgrade);
CLI::taskName('translation-repair');
CLI::taskDescription(<<<EOT
  Upgrade or repair translations for the specified workspace(s).

  If no workspace is specified, the command will be run in all workspaces. More
  than one workspace can be specified.

  This command will go through each language installed in ProcessMaker and
  update this workspace translations to match the current version of
  ProcessMaker.
EOT
);
CLI::taskArg('workspace-name', true, true);
CLI::taskRun(run_translation_upgrade);
/**
 * Function run_info
 * access public
 */
function run_info($args, $opts)
{
    $workspaces = get_workspaces_from_args($args);
    workspaceTools::printSysInfo();
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:31,代码来源:cliWorkspaces.php

示例8: run_flush_cache

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @package workflow-engine-bin-tasks
 */
G::LoadSystem("g");
CLI::taskName('flush-cache');
CLI::taskDescription(<<<EOT
    Flush cache of all workspaces of a given workspace

    If no workspace is specified, then the cache will be flushed in all available workspaces.
EOT
);
CLI::taskArg('workspace', true, true);
CLI::taskRun('run_flush_cache');
function run_flush_cache($args, $opts)
{
    $rootDir = realpath(__DIR__ . "/../../../../");
    $app = new Maveriks\WebApplication();
    $app->setRootDir($rootDir);
    $loadConstants = false;
    $workspaces = get_workspaces_from_args($args);
    if (!defined("PATH_C")) {
        die("ERROR: seems processmaker is not properly installed (System constants are missing)." . PHP_EOL);
    }
    CLI::logging("Flush " . pakeColor::colorize("system", "INFO") . " cache ... ");
开发者ID:emildev35,项目名称:processmaker,代码行数:32,代码来源:cliFlushCache.php

示例9: runHotfixInstall

<?php

CLI::taskName("hotfix-install");
CLI::taskDescription(<<<EOT
    Install hotfix to system

    This command installs a hotfix, which updates ProcessMaker in order to add improvements or fix bugs.
EOT
);
CLI::taskRun("runHotfixInstall");
function runHotfixInstall($command, $args)
{
    CLI::logging("HOTFIX", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
    CLI::logging("Install hotfix to system\n");
    $arrayFile = $command;
    if (count($arrayFile) > 0) {
        //Install hotfix
        foreach ($arrayFile as $value) {
            $f = $value;
            $result = workspaceTools::hotfixInstall($f);
            CLI::logging($result["message"] . "\n");
        }
        //Clear server's cache
        CLI::logging("\nClearing cache...\n");
        if (defined("PATH_C")) {
            G::rm_dir(PATH_C);
            G::mk_dir(PATH_C, 0777);
        }
        //Safe upgrade for JavaScript files
        CLI::logging("\nSafe upgrade for files cached by the browser\n\n");
        G::browserCacheFilesSetUid();
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cliHotfix.php

示例10: runHotfixInstall

<?php

CLI::taskName("hotfix-install");
CLI::taskDescription(<<<EOT
    Install hotfix to system

    This command is executed when you want to update certain files, which have improvements or bugs solutions.
EOT
);
CLI::taskRun(runHotfixInstall);
function runHotfixInstall($command, $args)
{
    CLI::logging("HOTFIX", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
    CLI::logging("Install hotfix to system\n");
    $arrayFile = $command;
    if (count($arrayFile) > 0) {
        //Install hotfix
        foreach ($arrayFile as $value) {
            $f = $value;
            $result = workspaceTools::hotfixInstall($f);
            CLI::logging($result["message"] . "\n");
        }
        //Clear server's cache
        CLI::logging("\nClearing cache...\n");
        if (defined("PATH_C")) {
            G::rm_dir(PATH_C);
            G::mk_dir(PATH_C, 0777);
        }
        //Safe upgrade for JavaScript files
        CLI::logging("\nSafe upgrade for files cached by the browser\n\n");
        G::browserCacheFilesSetUid();
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cliHotfix.php

示例11: rm_dir

 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @author Alexandre Rosenfeld <alexandre@colosa.com>
 * @package workflow-engine-bin-tasks
 */
G::LoadClass("system");
G::LoadClass("wsTools");
G::LoadSystem("dbMaintenance");
G::LoadClass("cli");
CLI::taskName('upgrade');
CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after upgrading ProcessMaker to a new version so that all workspaces are also upgraded to the\n  new version.");
CLI::taskOpt("buildACV", "If this option is enabled, the Cache View is built.", "ACV", "buildACV");
CLI::taskRun("run_upgrade");
/*----------------------------------********---------------------------------*/
CLI::taskArg('workspace');
/*----------------------------------********---------------------------------*/
/**
 * A version of rm_dir which does not exits on error.
 *
 * @param  string $filename directory or file to remove
 * @param  bool $filesOnly either to remove the containing directory as well or not
 */
function rm_dir($filename, $filesOnly = false)
{
    if (is_file($filename)) {
        @unlink($filename) or CLI::logging(CLI::error("Could not remove file {$filename}") . "\n");
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cliUpgrade.php

示例12: run_create

CLI::taskDescription(<<<EOT
    Update plugin translations

    LANG is the language, such as 'fr' (French) or 'zh-CN' (mainland Chinese).
  If the language is not specified, then it is 'en' (English) by default.

EOT
);
CLI::taskArg('plugin', false);
CLI::taskArg('lang', false);
CLI::taskRun("run_update");
CLI::taskName('plugins-translation-create');
CLI::taskDescription(<<<EOT
    Create .po file for the plugin

    LANG is the language, such as 'fr' (French) or 'zh-CN' (mainland Chinese).
  If the language is not specified, then it is 'en' (English) by default.

EOT
);
CLI::taskArg('plugin', true);
CLI::taskArg('lang', true);
CLI::taskRun("run_create");
function run_create($command, $args)
{
    CLI::logging("Create .po file ...\n");
    $language = new Language();
    $language->createLanguagePlugin($command[0], $command[1]);
    CLI::logging("Create successful\n");
}
function run_update($command, $args)
{
开发者ID:emildev35,项目名称:processmaker,代码行数:32,代码来源:cliPlugins.php

示例13: minify_javascript

 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @author Alexandre Rosenfeld <alexandre@colosa.com>
 * @package workflow-engine-bin-tasks
 */
CLI::taskName('build-js');
CLI::taskDescription(<<<EOT
    Generate Javascript Files

    This command should be run after any modification of JavaScript files in
  the gulliver/js/* directory.
EOT
);
CLI::taskOpt("lang", "", "lLANG", "lang=LANG");
//CLI::taskOpt("minify", "If the option is enabled, performs the build only with minified files", "min", "buildmin");
CLI::taskRun("minify_javascript");
function minify_javascript($command, $args)
{
    CLI::logging("BUILD-JS\n");
    //disabling the rakefile version, until we have updated the dev environment
    //CLI::logging("Checking if rake is installed...\n");
    //$rakeFile = PROCESSMAKER_PATH . "workflow/engine/bin/tasks/Rakefile";
    //system('rake -f ' . $rakeFile);
    require_once PATH_THIRDPARTY . 'jsmin/jsmin.php';
    $libraries = json_decode(file_get_contents(PATH_HOME . 'engine/bin/tasks/libraries.json'));
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cliRake.php

示例14: rm_dir

 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 * @author Alexandre Rosenfeld <alexandre@colosa.com>
 * @package workflow-engine-bin-tasks
 */
G::LoadClass("system");
G::LoadClass("wsTools");
CLI::taskName('upgrade');
CLI::taskDescription(<<<EOT
    Upgrade workspaces.

    This command should be run after ProcessMaker files are upgraded so that all
    workspaces are upgraded to the current version.
EOT
);
CLI::taskOpt("buildACV", "If the option is enabled, performs the Build Cache View.", "ACV", "buildACV");
CLI::taskRun(run_upgrade);
/**
 * A version of rm_dir which does not exits on error.
 *
 * @param  string $filename directory or file to remove
 * @param  bool $filesOnly either to remove the containing directory as well or not
 */
function rm_dir($filename, $filesOnly = false)
{
    if (is_file($filename)) {
        @unlink($filename) or CLI::logging(CLI::error("Could not remove file {$filename}") . "\n");
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:31,代码来源:cliUpgrade.php

示例15: run_create

G::LoadClass("wsTools");

CLI::taskName('plugins-translation-update');
CLI::taskDescription(<<<EOT
    Update plugin translations

EOT
);
CLI::taskArg('plugin', false);
CLI::taskArg('lang', false);
CLI::taskRun("run_update");

CLI::taskName('plugins-translation-create');
CLI::taskDescription(<<<EOT
    Create .po file for the plugin

EOT
);
CLI::taskArg('plugin', true);
CLI::taskArg('lang', true);
CLI::taskRun("run_create");


function run_create($command, $args)
{
    CLI::logging("Create .po file ...\n");

    $language = new Language();
    $language->createLanguagePlugin($command[0], $command[1]);
    CLI::logging("Create successful\n");
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:30,代码来源:cliPlugins.php


注:本文中的CLI::taskDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。