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


PHP Updater::run方法代码示例

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


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

示例1: dirname

<?php

require_once dirname(__FILE__) . '/classes/Config.class.php';
require_once dirname(__FILE__) . '/_config.php';
require_once dirname(__FILE__) . '/classes/Mysql.class.php';
require_once dirname(__FILE__) . '/classes/Updater.class.php';
// First setup global DB connection
$db = new Mysql(Config::get('mysql_user'), Config::get('mysql_pass'), Config::get('mysql_db'), Config::get('mysql_host'), Config::get('mysql_port'));
// Gonna have to check for DB installation
Updater::run();
开发者ID:robrepp,项目名称:Statusarchy,代码行数:10,代码来源:init.inc.php

示例2: strtr

#!/usr/bin/php -dphar.readonly=0
<?php 
/**
 * The installer updater stub for extension phars
 */
namespace pharext;

spl_autoload_register(function ($c) {
    return include strtr($c, "\\_", "//") . ".php";
});
set_include_path('phar://' . __FILE__ . ":" . get_include_path());
if (!extension_loaded("Phar")) {
    fprintf(STDERR, "ERROR: Phar extension not loaded\n\n");
    fprintf(STDERR, "\tPlease load the phar extension in your php.ini\n" . "\tor rebuild PHP with the --enable-phar flag.\n\n");
    exit(1);
}
if (ini_get("phar.readonly")) {
    fprintf(STDERR, "ERROR: Phar is configured read-only\n\n");
    fprintf(STDERR, "\tPlease specify phar.readonly=0 in your php.ini\n" . "\tor run this command with php -dphar.readonly=0\n\n");
    exit(1);
}
\Phar::interceptFileFuncs();
\Phar::mapPhar();
$updater = new Updater();
$updater->run($argc, $argv);
__halt_compiler();
开发者ID:m6w6,项目名称:pharext,代码行数:26,代码来源:pharext_updater.php

示例3: __construct

#!/usr/bin/php 
<?php 
// Update after deployment for location of non-public files
$root = dirname(dirname(__FILE__));
// We're assuming the Zend Framework is already on the include_path
// TODO this should be moved to the boostrap file
set_include_path($root . '/application' . PATH_SEPARATOR . $root . '/application/admin/models' . PATH_SEPARATOR . $root . '/application/public/models' . PATH_SEPARATOR . $root . '/library' . PATH_SEPARATOR . $root . '/library/Feedcreator' . PATH_SEPARATOR . get_include_path());
// We don't want to limit this script in time
ini_set('max_execution_time', 0);
// Prepare the environment
require_once 'Bootstrap.php';
Bootstrap::prepare();
// Go !
$updater = new Updater($argc, $argv);
$updater->run();
class Updater
{
    private $cl_username;
    private $cl_source;
    private $config;
    private $logger;
    public function __construct($argc, $argv)
    {
        // Get the config
        $this->config = Zend_Registry::get("configuration");
        // Setup a logger
        $this->logger = new Zend_Log();
        $log_root = isset($this->config->path->logs) ? $this->config->path->logs : $root . '/logs';
        $this->logger->addWriter(new Zend_Log_Writer_Stream($log_root . '/updates.log'));
        Zend_Registry::set('logger', $this->logger);
        // Parse the command line
开发者ID:kreativmind,项目名称:storytlr,代码行数:31,代码来源:update.php

示例4: removeCacheDir

        $this->updateDatabaseFields();
    }
    /**
     *
     */
    protected function removeCacheDir()
    {
        if (is_dir(TL_ROOT . '/system/cache/timelinejs')) {
            // Purge the folder
            $objFolder = new \Folder('system/cache/timelinejs');
            $objFolder->purge();
            $objFolder->delete();
            // Add a log entry
            \Controller::log('Removed not used timelinejs cache directory', 'TimelineJSRunOnce run()', TL_CRON);
        }
    }
    /**
     *
     */
    protected function updateDatabaseFields()
    {
        if (version_compare(VERSION, '3.1', '>')) {
            \Database\Updater::convertSingleField('tl_timelinejs', 'singleSRC');
            \Database\Updater::convertSingleField('tl_timelinejs_entry', 'singleSRC');
            \Database\Updater::convertSingleField('tl_timelinejs_entry', 'thumbnail');
        }
    }
}
$controller = new Updater();
$controller->run();
开发者ID:netzmacht,项目名称:contao-timelinejs,代码行数:30,代码来源:runonce.php


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