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


PHP functions::exitMe方法代码示例

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


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

示例1: array

$info = array('source_host' => $command->getSourceHost(), 'source_db' => $command->getSourceDB(), 'source_username' => $command->getSourceUsrName(), 'source_password' => $command->getSourcePWD(), 'source_port' => $command->getSourcePort(), 'target_host' => $command->getTargetHost(), 'target_db' => $command->getTargetDB(), 'target_username' => $command->getTargetUsrName(), 'target_password' => $command->getTargetPWD(), 'target_port' => $command->getTargetPort(), 'color' => $command->getColor(), 'report_level' => $command->getReportLevel(), 'sql_fix' => $command->getSQLFix());
// Load the help manual on the console
if ($command->getHelp()) {
    echo file_get_contents('../app/help.txt');
    functions::calMaxErrorLevel(_FILE_NOT_EXIST, TRUE, $command->getFailLevel());
}
// output the header on the screeen if verbosity was set
if ($command->getVerbose() == TRUE) {
    echo functions::parseOutoutHeader($info);
}
// Making sure all parameters have been defined
if ($command->getSourcePort() == '' || $command->getSourceDB() == '' || $command->getSourceUsrName() == '' || $command->getSourcePWD() == '' || $command->getTargetPort() == '' || $command->getTargetDB() == '' || $command->getTargetUsrName() == '' || $command->getTargetPWD() == '') {
    echo 'Please define all necessarily parameters or use the script with --help to see the details...' . PHP_EOL . PHP_EOL;
    functions::calMaxErrorLevel(_DEFINE_PARAM, TRUE, $command->getFailLevel());
}
// If specific test been defined in the command line here it will get loaded
$test = $command->getTests();
// if tests were not defined in the command line then read the tests from RuleConfig file
if ($test['test-flag'] === FALSE) {
    $test = App_Config_RulesConfig::getTestConfig($command->getTargetDB());
}
// Start running the schema checker
$chk = new App_Exphandler_General($info, $test);
$result = $chk->schemaChecker();
// If verbose requested print the report
if ($command->getVerbose()) {
    echo $result;
}
// exist status
functions::exitMe($command->getFailLevel());
开发者ID:kourosh-samia,项目名称:schemachecker,代码行数:30,代码来源:chkschemar.php

示例2: checkArgument

 private function checkArgument($temp, $msg_source)
 {
     if (count($temp) == 1) {
         echo functions::getSysMsgSource($msg_source);
         functions::calMaxErrorLevel(_FATAL);
         functions::exitMe();
     } else {
         if (trim($temp[1]) == '') {
             echo functions::getSysMsgSource($msg_source, 'error');
             functions::calMaxErrorLevel(_FATAL);
             functions::exitMe();
         } else {
             switch ($msg_source) {
                 case 'test':
                     $this->setTests($temp[1]);
                     break;
                 case 'source-database':
                     $this->setSourceDB(trim($temp[1]));
                     break;
                 case 'source-host':
                     $this->setSourceHost(trim($temp[1]));
                     break;
                 case 'source-port':
                     $this->setSourcePORT(trim($temp[1]));
                     break;
                 case 'source-username':
                     $this->setSourceUsrName(trim($temp[1]));
                     break;
                 case 'source-password':
                     $this->setSourcePWD(trim($temp[1]));
                     break;
                 case 'target-database':
                     $this->setTargetDB(trim($temp[1]));
                     break;
                 case 'target-host':
                     $this->setTargetHost(trim($temp[1]));
                     break;
                 case 'target-port':
                     $this->setTargetPORT(trim($temp[1]));
                     break;
                 case 'target-username':
                     $this->setTargetUsrName(trim($temp[1]));
                     break;
                 case 'target-password':
                     $this->setTargetPWD(trim($temp[1]));
                     break;
                 case 'error-level':
                     $this->setReportLevel(trim($temp[1]));
                     break;
                 case 'fail-level':
                     $this->setFailLevel(trim($temp[1]));
                     break;
             }
         }
     }
 }
开发者ID:kourosh-samia,项目名称:schemachecker,代码行数:56,代码来源:commandLine.php


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