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