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


PHP Bootstrap::start方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->ROOT = realpath(dirname(__FILE__) . '/../../../');
     //imports
     require_once $this->ROOT . '/inc/config.inc.php';
     Bootstrap::start();
     $this->db = Database::obtain(INIT::$DB_SERVER, INIT::$DB_USER, INIT::$DB_PASS, INIT::$DB_DATABASE);
     $this->db->connect();
     //init params
     $this->path = $this->ROOT . '/lib/Utils/converter_checker';
     $resultSet = $this->db->fetch_array(self::selectAllNotOffline);
     if (empty($resultSet)) {
         self::_prettyEcho("------------------------------------");
         self::_prettyEcho("************* WARNING **************");
         self::_prettyEcho("------------------------------------");
         $this->alertForEmptyPool();
         die(1);
     }
     foreach ($resultSet as $conv) {
         //            self::$ipLog = $conv[ 'ip_converter' ];
         $this->resultSet[$conv['ip_converter']] = $conv;
         $this->host_machine_map[$conv['ip_converter']] = array('ip_machine_host' => $conv['ip_machine_host'], 'machine_host_user' => $conv['machine_host_user'], 'machine_host_pass' => $conv['machine_host_pass'], 'instance_name' => $conv['instance_name']);
         //            self::_prettyEcho( "Retrieving Processes Info on " . $conv[ 'ip_converter' ] );
         //            $converter_json_top = self::getNodeProcessInfo( $conv[ 'ip_converter' ] );
         //            if ( !empty( $converter_json_top ) ) {
         //                $this->convertersTop[ $conv[ 'ip_converter' ] ] = array(
         //                    'converter_load'     => $converter_json_top[ 0 ],
         //                    'converter_json_top' => $converter_json_top[ 1 ]
         //                );
         //            }
     }
     $this->converterFactory = new FileFormatConverter();
 }
开发者ID:indynagpal,项目名称:MateCat,代码行数:33,代码来源:check_converter_by_file_content.php

示例2: run

 public static function run()
 {
     self::$start = microtime();
     self::prepare();
     self::parseDomain();
     $response = self::$frontController->dispatch();
     self::sendResponse($response);
     self::logStats();
 }
开发者ID:segphault,项目名称:storytlr,代码行数:9,代码来源:Bootstrap.php

示例3: __construct

 public function __construct()
 {
     if (!class_exists("INIT")) {
         include_once "../../inc/config.inc.php";
         Bootstrap::start();
     }
     $this->opt['httpheader'] = array("Content-Type:multipart/form-data;charset=UTF-8");
     $this->lang_handler = Langs_Languages::getInstance();
     $this->conversionObject = new ArrayObject(array('ip_machine' => null, 'ip_client' => null, 'path_name' => null, 'file_name' => null, 'path_backup' => null, 'file_size' => 0, 'direction' => null, 'error_message' => null, 'src_lang' => null, 'trg_lang' => null, 'status' => 'ok', 'conversion_time' => 0), ArrayObject::ARRAY_AS_PROPS);
     $db = Database::obtain();
     $converters = $db->fetch_array("SELECT ip_converter, cpu_weight, ip_storage, segmentation_rule FROM converters WHERE status_active = 1 AND status_offline = 0");
     foreach ($converters as $converter_storage) {
         self::$converters[$converter_storage['ip_converter']] = $converter_storage['cpu_weight'];
         self::$Storage_Lookup_IP_Map[$converter_storage['ip_converter']] = $converter_storage['ip_storage'];
         self::$converter2segmRule[$converter_storage['ip_converter']] = $converter_storage['segmentation_rule'];
     }
     //        self::$converters = array('10.11.0.98' => 1);//for debugging purposes
     //        self::$Storage_Lookup_IP_Map = array('10.11.0.98' => '10.11.0.99');//for debugging purposes
     $this->storage_lookup_map = self::$Storage_Lookup_IP_Map;
 }
开发者ID:reysub,项目名称:MateCat,代码行数:20,代码来源:FileFormatConverter.php

示例4: header

<?php

if (!@(include_once 'inc/Bootstrap.php')) {
    header("Location: configMissing");
}
Bootstrap::start();
$db = Database::obtain(INIT::$DB_SERVER, INIT::$DB_USER, INIT::$DB_PASS, INIT::$DB_DATABASE);
$db->connect();
Log::$uniqID = isset($_COOKIE['PHPSESSID']) ? substr($_COOKIE['PHPSESSID'], 0, 13) : uniqid();
$controller = controller::getInstance();
$controller->doAction();
$controller->finalize();
$db->close();
开发者ID:reysub,项目名称:MateCat,代码行数:13,代码来源:index.php

示例5: dirname

<?php

/*  
 * 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; under version 2
 * of the License (non-upgradable).
 * 
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 * 
 * Copyright (c) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung (under the project TAO-TRANSFER);
 *               2009-2012 (update and modification) Public Research Centre Henri Tudor (under the project TAO-SUSTAIN & TAO-DEV);
 * 
 */
require_once dirname(__FILE__) . '/../../tao/includes/class.Bootstrap.php';
$bootStrap = new Bootstrap('taoCampaign');
$bootStrap->start();
开发者ID:nagyist,项目名称:extension-tao-campaign,代码行数:24,代码来源:bootstrap.php

示例6: Bootstrap

<?php

session_start();
require_once 'config.php';
require_once 'controllers/bootstrap.php';
require_once 'controllers/controller.php';
//$controller = new Controller();
//$controller->start();
$bootstrap = new Bootstrap();
$bootstrap->start();
?>


开发者ID:armenadamyan30,项目名称:code_examples,代码行数:11,代码来源:index.php

示例7: Bootstrap

<?php

error_reporting(E_ERROR & ~E_NOTICE);
include '../application/Bootstrap.php';
$boot = new Bootstrap();
$boot->start();
开发者ID:jcvpalma,项目名称:avaliacao_desenv_php_zend17,代码行数:6,代码来源:index.php


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