当前位置: 首页>>代码示例>>PHP>>正文


PHP Installer::run方法代码示例

本文整理汇总了PHP中Installer::run方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::run方法的具体用法?PHP Installer::run怎么用?PHP Installer::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Installer的用法示例。


在下文中一共展示了Installer::run方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

}));
Route::post('account', array('before' => 'check', 'main' => function () {
    $account = Input::get(array('username', 'email', 'password'));
    $validator = new Validator($account);
    $validator->check('username')->is_max(3, 'Please enter a username');
    $validator->check('email')->is_email('Please enter a valid email address');
    $validator->check('password')->is_max(6, 'Please enter a password, at least 6 characters long');
    if ($errors = $validator->errors()) {
        Input::flash();
        Notify::error($errors);
        return Response::redirect('account');
    }
    Session::put('install.account', $account);
    // run install process
    try {
        Installer::run();
    } catch (Exception $e) {
        Input::flash();
        Notify::error($e->getMessage());
        return Response::redirect('account');
    }
    return Response::redirect('complete');
}));
/*
    Complete
*/
Route::get('complete', function () {
    // check we have a database
    if (!Session::get('install')) {
        Notify::error('Please select your language');
        return Response::redirect('start');
开发者ID:anchorcms,项目名称:anchor-cms,代码行数:31,代码来源:routes.php

示例2: define

define('TEMPLATE_DIR', JETHRO_ROOT . '/templates/');
// Load configuration
if (!is_readable(JETHRO_ROOT . '/conf.php')) {
    trigger_error('Jethro configuration file not found.  You need to copy conf.php.sample to conf.php and edit it before Jethro can run', E_USER_ERROR);
    exit;
}
require_once JETHRO_ROOT . '/conf.php';
// Initialise system
if (!defined('DSN')) {
    define('DSN', constant('PRIVATE_DSN'));
}
require_once JETHRO_ROOT . '/include/init.php';
// Set up the user system
require_once JETHRO_ROOT . '/include/user_system.class.php';
require_once JETHRO_ROOT . '/include/system_controller.class.php';
$GLOBALS['user_system'] = new User_System();
if ($GLOBALS['user_system']->getCurrentUser() == NULL) {
    System_Controller::checkConfigHealth();
    // Nobody is logged in, so show login screen or installer
    if (!$GLOBALS['user_system']->hasUsers()) {
        require_once JETHRO_ROOT . '/include/installer.class.php';
        $installer = new Installer();
        $installer->run();
    } else {
        $GLOBALS['user_system']->printLogin();
    }
} else {
    // We have a user, so run the system
    $GLOBALS['system'] = System_Controller::get();
    System_Controller::get()->run();
}
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:31,代码来源:index.php

示例3: strtr

#!/usr/bin/env php
<?php 
/**
 * The installer sub-stub for extension phars
 */
namespace pharext;

define("PHAREXT_PHAR", __FILE__);
spl_autoload_register(function ($c) {
    return include strtr($c, "\\_", "//") . ".php";
});
#include <pharext/Exception.php>
#include <pharext/Tempname.php>
#include <pharext/Tempfile.php>
#include <pharext/Tempdir.php>
#include <pharext/Archive.php>
namespace pharext;

if (extension_loaded("Phar")) {
    \Phar::interceptFileFuncs();
    \Phar::mapPhar();
    $phardir = "phar://" . __FILE__;
} else {
    $archive = new Archive(__FILE__);
    $phardir = $archive->extract();
}
set_include_path("{$phardir}:" . get_include_path());
$installer = new Installer();
$installer->run($argc, $argv);
__halt_compiler();
开发者ID:m6w6,项目名称:pharext,代码行数:30,代码来源:pharext_installer.php

示例4: cloneDirs

        }
    }
    protected static function cloneDirs($dirsPath, $targetDir)
    {
        $dirResource = opendir($dirsPath);
        if (!$dirResource) {
            static::$quiet || (print "[30;1;31mCan't read dir[0m" . PHP_EOL);
            return;
        }
        while ($fileName = readdir($dirResource)) {
            if ($fileName == '.' || $fileName == '..') {
                continue;
            }
            if (false !== in_array($fileName, static::$ignoreList)) {
                continue;
            }
            static::cloneItem($dirsPath . DIRECTORY_SEPARATOR . $fileName, $targetDir);
        }
        closedir($dirResource);
    }
    public static function run($sourseDir, $targetDir, $ignoreList = [], $forceRewrite = false, $quiet = false)
    {
        static::$ignoreList = $ignoreList;
        static::$forceRewrite = $forceRewrite;
        static::$quiet = $quiet;
        static::cloneDirs($sourseDir, $targetDir);
        echo PHP_EOL;
    }
}
\Installer::run($currentDir, $targetDir, $ignoreList, $rewrite, $quiet);
开发者ID:TopDigital,项目名称:topd-sceleton,代码行数:30,代码来源:install.php

示例5: run

<?php

$CONFIG['SOFTWARE'] = 'TypeShow Update';
$CONFIG['PACKAGE_NAME'] = 'typeshow.update.zip';
$CONFIG['PACKAGE_URL'] = 'http://update.typeshow.net/' . $CONFIG['PACKAGE_NAME'];
// Protect extracted package directories
//$CONFIG['PROTECT'][] = 'admin';
//$CONFIG['PROTECT'][] = 'resources';
// Where to go after finish...
$CONFIG['AFTER_INSTALL'] = 'index.html?please_refresh';
// Help files
$FAQ['NO_FILESYSTEM_ACCESS'] = 'http://typeshow.net/faq/#no_filesystem_access';
$FAQ['NO_ZIP_SUPPORT'] = 'http://typeshow.net/faq/#no_zip_support';
$FAQ['DOWNLOAD_RESTRICTIONS'] = 'http://typeshow.net/faq/#php_download_restrictions';
Installer::run('..');
class Installer
{
    private static $software;
    private static $package;
    private static $packageUrl;
    private static $folder;
    private static $me;
    public static function run($folder = '.')
    {
        global $FAQ, $CONFIG;
        self::$folder = $folder;
        self::$software = $CONFIG['SOFTWARE'];
        self::$package = $CONFIG['PACKAGE_NAME'];
        self::$packageUrl = $CONFIG['PACKAGE_URL'];
        self::$me = basename(__FILE__);
        $step = 1;
开发者ID:Raureif,项目名称:TypeShow,代码行数:31,代码来源:update.php


注:本文中的Installer::run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。