當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Installer::instance方法代碼示例

本文整理匯總了PHP中Installer::instance方法的典型用法代碼示例。如果您正苦於以下問題:PHP Installer::instance方法的具體用法?PHP Installer::instance怎麽用?PHP Installer::instance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Installer的用法示例。


在下文中一共展示了Installer::instance方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getInstance

 /**
  * Get Installer instance
  *
  * @return Installer
  */
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new Installer();
         // use lazy loading
         if (!class_exists('Loader', FALSE)) {
             require_once THINKUP_WEBAPP_PATH . '_lib/model/class.Loader.php';
         }
         Loader::register();
         // get required version of php and mysql
         // and set current version
         require THINKUP_WEBAPP_PATH . 'install/version.php';
         self::$required_version = array('php' => $THINKUP_VERSION_REQUIRED['php'], 'mysql' => $THINKUP_VERSION_REQUIRED['mysql']);
         self::$current_version = $THINKUP_VERSION;
     }
     return self::$instance;
 }
開發者ID:rayyan,項目名稱:ThinkUp,代碼行數:22,代碼來源:class.Installer.php

示例2: preg_replace

$clean_url = preg_replace(array('/\\/{2,}/i', '/install$/i'), array('/', null), $clean_url);
$clean_url = rtrim($clean_url, '/\\');
define('DOMAIN', $clean_url);
$clean_path = rtrim(dirname(__FILE__), '/\\');
$clean_path = preg_replace(array('/\\/{2,}/i', '/install$/i'), array('/', null), $clean_path);
$clean_path = rtrim($clean_path, '/\\');
define('DOCROOT', $clean_path);
// Required boot components
define('VERSION', '2.6.4');
define('INSTALL', DOCROOT . '/install');
// Include autoloader:
require_once DOCROOT . '/vendor/autoload.php';
// Include the boot script:
require_once DOCROOT . '/symphony/lib/boot/bundle.php';
define('INSTALL_LOGS', MANIFEST . '/logs');
define('INSTALL_URL', URL . '/install');
// If prompt to remove, delete the entire `/install` directory
// and then redirect to Symphony
if (isset($_GET['action']) && $_GET['action'] == 'remove') {
    General::deleteDirectory(INSTALL);
    redirect(SYMPHONY_URL);
}
// If Symphony is already installed, run the updater
if (file_exists(CONFIG)) {
    // System updater
    $script = Updater::instance();
} else {
    // System installer
    $script = Installer::instance();
}
return $script->run();
開發者ID:jurajkapsz,項目名稱:symphony-2,代碼行數:31,代碼來源:index.php


注:本文中的Installer::instance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。