本文整理汇总了PHP中Cli::success方法的典型用法代码示例。如果您正苦于以下问题:PHP Cli::success方法的具体用法?PHP Cli::success怎么用?PHP Cli::success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cli
的用法示例。
在下文中一共展示了Cli::success方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: selectScreen
function selectScreen()
{
println();
Cli::output("1. Set up environment variables");
Cli::output("2. Install certificate for Arcanist (requires 1.)");
Cli::output("3. Install TortoiseSVN");
Cli::output("4. Install TortoiseGit and Git for Windows");
Cli::output("5. Install Notepad++ 6.3");
Cli::output("6. Configure Arcanist to use Notepad++");
Cli::output("0. Exit");
println();
Cli::notice("You can press Ctrl+C anytime to exit");
println();
Cli::output("How do you feel today?");
$selection = readInput();
switch ($selection) {
case 0:
exit(0);
break;
case 1:
Cli::notice("If plenty of error messages pop up, don't worry. That's just me testing whether it works or not. The error messages penetrate my error blocking barreers...");
Cli::output("Press a button to continue");
println();
Cli::notice("Admin rights may be necessary - Idk");
dontMove();
ob_start();
$checkEnv = checkEnvVars();
ob_end_clean();
if ($checkEnv) {
println();
Cli::success("Environment already set up - can't be bothered to change");
} else {
addToPathEnv("PHP");
addToPathEnv("arc\\arcanist\\bin");
Cli::notice("Please restart the install script (that is, close this window completely) and re-run this step to see if it worked.");
Cli::output("You know that it failed when the same errors happen.");
}
break;
case 2:
installCertificate();
break;
case 3:
Cli::notice("Please remember to install with the command line tools feature");
println();
Cli::notice("Installing TortoiseSVN");
exec("start " . ROOT . "Installers\\TortoiseSVN\\TortoiseSVN-1.7.11.23600-" . (OS_ARCH == 32 ? "win32" : "x64") . "-svn-1.7.8.msi");
break;
case 4:
Cli::notice("Installing TortoiseGit");
exec("start " . ROOT . "Installers\\TortoiseGit\\TortoiseGit-1.8.1.0-" . OS_ARCH . "bit.msi");
Cli::notice("Please wait until TortoiseGit has finished installing.");
dontMove();
Cli::notice("Installing Git for Windows");
exec("start " . ROOT . "Installers\\GitForWindows\\Git-1.8.1.2-preview20130201.exe");
break;
case 5:
Cli::notice("I recommend installing into the default directory.");
println();
Cli::notice("Installing Notepad++ 6.3");
exec("start " . ROOT . "Installers\\Notepad++\npp.6.3.Installer.exe");
break;
case 6:
installArcEditor();
break;
default:
Cli::output("Invalid input!");
break;
}
selectScreen();
}