本文整理匯總了PHP中Setup::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP Setup::init方法的具體用法?PHP Setup::init怎麽用?PHP Setup::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Setup
的用法示例。
在下文中一共展示了Setup::init方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
public function init()
{
parent::init();
return;
}
示例2: printHelp
echo "{$message}";
echo "\n--------------------------------------------------------------------------------";
echo "\n";
}
/*echo getcwd();
echo "Número: $argc\n";
echo "Params: $argv\n";*/
if ($argc != 2 || in_array($argv[1], array('--help', '-help', '-h', '-?'))) {
printHelp();
}
//Directorio principal
$path = getcwd();
echo getcwd();
//Instanciamos clase base
require_once 'setup_cli.class.php';
$setup =& Setup::init();
//Configuración del idioma
$setup->setLanguage($argv[1], $path);
//Presentaciones inicio
echo "\n\n";
echo $setup->log(agt('setupIntro'), 'label');
echo "\n\n";
echo $setup->log(agt('setupDet'), 'label');
echo "\n\n";
$setup->intro();
// Controlamos la existencia de los elementos necesarios para el setup
// Comprobamos las extesiones necesarias, tanto para el setup como para miguel
printStep(agt('step1'), agt('step1Des'));
$exts = array('standard', 'gettext', 'session', 'zlib', 'pcre');
for ($i = 0; $i < count($exts); $i++) {
if (!$setup->check($exts[$i])) {
示例3: define
<?php
/*********************************************************************
SHA1 hash of the info page password, the preset password is the
empty string. You might change it to keep this information private.
Online hash generator: http://www.sha1.cz/
*********************************************************************/
define("PASSHASH", "da39a3ee5e6b4b0d3255bfef95601890afd80709");
function normalized_require_once($lib)
{
require_once preg_replace("#[\\\\/]+#", "/", dirname(__FILE__) . "/inc/{$lib}.php");
}
function __autoload($class_name)
{
normalized_require_once("class-" . strtolower($class_name));
}
Setup::init();
$app = new App();
if (Util::has_request_param("action")) {
$api = new Api($app);
$api->apply();
} else {
define("FALLBACK", $app->get_fallback());
normalized_require_once("page");
}