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


PHP Main::init方法代码示例

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


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

示例1: Main

 * 
 * This program is free software;
 * you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
 * version 3 of the License.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, see <http://www.gnu.org/licenses/>.
 */
/**
 * 
 */
set_time_limit(0);
header("Content-Type: text/html; charset=utf-8");
define("UNIT_TEST", false);
require_once "config/version.php";
require_once "core/include/base/system/system_config.class.php";
SystemConfig::load_system_config("config/main.php");
date_default_timezone_set($server['timezone']);
require_once "core/include/base/system/template.class.php";
require_once "core/include/base/system/html_template.class.php";
require_once "core/include/base/system/js_template.class.php";
Template::set_fallback_folder("xhtml");
Template::set_current_folder("xhtml");
require_once "core/main.php";
$main = new Main();
$main->init();
开发者ID:suxinde2009,项目名称:www,代码行数:30,代码来源:index.php

示例2: translator

     translator_edit($option, $task);
     break;
 case 'del_lang':
 case 'lang':
     translator($option);
     break;
 case 'recurse_database':
     goRecurseDatabases();
     break;
 case 'recurse_files':
     goRecurseFiles();
     break;
 case 'cleanup':
     include_once "classes/main.class.php";
     $main = new Main();
     $main->init($_CONFIG);
     $main->cleanUp();
     break;
 case 'refresh':
     generateBackuprefresh($cid, $option, $_REQUEST['backup'], $_CONFIG['refresh_mode']);
     break;
 case 'generate':
     if (empty($_POST) || !wp_verify_nonce($_POST['csrf'], 'generate')) {
         print 'Sorry, your nonce did not verify.';
         exit;
     }
     if ($_CONFIG['refresh_mode']) {
         $_REQUEST['mode'] = "start";
         if ($_CONFIG['enable_db_backup']) {
             goRecurseDatabases();
         }
开发者ID:WordPressArt,项目名称:conisia,代码行数:31,代码来源:admin.cloner.php

示例3: init

<?php

/*
 * Created on 		19.09.2009
 *
 * @see http://github.com/swwwfactory/entry8
 *
 */
namespace swwwfactory\Dev;

class Main
{
    public static function init()
    {
        //called
        include __DIR__ . '/utils.php';
        include __DIR__ . '/loader.php';
    }
    public static function setup()
    {
        //setup
        echo 'Called phar stub with method: ', __METHOD__, PHP_EOL;
    }
}
Main::init();
开发者ID:swwwfactory,项目名称:entry8,代码行数:25,代码来源:init.php

示例4: function

<?php

/**
 * Plugin Name:  Combined Query
 * Description:  This plugin allows you to combine multiple WP_Query() queries, into a single one.
 * Plugin URI:   https://github.com/birgire/wp-combined-queries
 * Author:       birgire
 * GitHub Plugin URI: https://github.com/birgire/wp-combined-queries.git
 * Author URI:   https://github.com/birgire
 * License:      MIT
 * Version:      1.0.0
 */
namespace Birgir\CombinedQuery;

/**
 * Autoload
 */
\add_action('plugins_loaded', function () {
    if (file_exists(__DIR__ . '/vendor/autoload.php')) {
        require __DIR__ . '/vendor/autoload.php';
    }
});
/**
 * Init
 */
\add_action('init', function () {
    if (class_exists(__NAMESPACE__ . '\\Main')) {
        $o = new Main();
        $o->init(new Generator(new EmptyQuery()), $GLOBALS['wpdb']);
    }
});
开发者ID:britco,项目名称:wp-combine-queries,代码行数:31,代码来源:combined-query.php


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