本文整理汇总了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());
示例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;
}
}
}
}