本文整理汇总了PHP中Bootstrap::run方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::run方法的具体用法?PHP Bootstrap::run怎么用?PHP Bootstrap::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bootstrap
的用法示例。
在下文中一共展示了Bootstrap::run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
<?php
error_reporting(E_ALL);
date_default_timezone_set('US/Eastern');
if (!defined('ROOT_PATH')) {
define('ROOT_PATH', dirname(dirname(__FILE__)));
}
try {
include ROOT_PATH . "/app/var/bootstrap.php";
/**
* Handle the request
*/
$app = new Bootstrap(new \Phalcon\DI\FactoryDefault());
echo $app->run(array());
} catch (\Exception $e) {
echo $e->getMessage();
}
示例2: define
<?php
define('H5AI_VERSION', '0.28.1');
define('MIN_PHP_VERSION', '5.5.0');
if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) {
header('Content-type: text/plain;charset=utf-8');
echo '[err] h5ai requires PHP ' . MIN_PHP_VERSION . ' or later, but found PHP ' . PHP_VERSION;
exit;
}
require_once __DIR__ . '/../private/php/class-bootstrap.php';
Bootstrap::run();
示例3: die
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser *
* General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with the script. *
* If not, see http://www.gnu.org/licenses/lgpl.html *
* */
/**
* Bootstrap for the FLOWLite Framework
*
* @version $Id: FLOWLite.php 0837 2011-06-02 10:05:24 sko $
* @author Silvan Kolb <kontakt@silvankolb.de>
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser Public License, version 3 or later
*/
version_compare(PHP_VERSION, '5.2.0', '>=') or die('Because FLOWLite uses OOP specifics, it requires at least PHP 5.2.0, you have ' . phpversion() . ' (Error #1255310789)' . PHP_EOL);
define('FL_PATH_CLASSES', $_SERVER["DOCUMENT_ROOT"] . '/' . 'FLOWLite/Unity/Framework/FL/Classes');
define('FL_PATH_BOOTSTRAP', $_SERVER["DOCUMENT_ROOT"] . '/' . 'FLOWLite/Unity/Framework/FL/Classes/Core/');
define('FL_PATH_CONFIG', $_SERVER["DOCUMENT_ROOT"] . '/' . 'FLOWLite/Unity/Framework/FL/Configuration/');
define('FL_PATH_XML', $_SERVER["DOCUMENT_ROOT"] . '/' . 'FLOWLite/Unity/Framework/FL/Configuration/config.xml');
define('FL_PATH_ORM', $_SERVER["DOCUMENT_ROOT"] . '/' . 'FLOWLite/Unity/Application/ORM');
/*
* path to bootstrap
*/
require FL_PATH_BOOTSTRAP . 'Bootstrap.php';
/*
* running framework
*/
$FLOWLite = new Bootstrap();
$FLOWLite->initialize();
$FLOWLite->run();
示例4: exit
<?php
/**
* Plugin Name: People to follow Plugin
* Plugin URI: https://github.com
* Author: Corneliu Iancu
* Author URI: https://github.com/socratemus
* Description: My custom events plugin.
* Version: 0.0.1
* License: GPLv2
*/
if (!defined("ABSPATH")) {
exit('action not allowed');
}
require 'bootstrap.php';
$app = new Bootstrap();
$app->run('registerTableGateway')->exec();
register_activation_hook(__FILE__, 'jal_install');
$app->run('registerEvents')->exec();
$app->run('registerShortcode')->exec();
$app->run('enableShortCodes')->exec();
$app->run('registerAjaxCalls')->exec();
$app->run('accountActions')->exec();
$app->run('enableGeneralActions')->exec();
$app->router();
示例5: Request
<?php
require_once 'app/Request.php';
require_once 'app/Bootstrap.php';
try {
echo '<br />' . Bootstrap::run(new Request());
} catch (Exception $e) {
echo '<br />' . $e->getMessage();
}
示例6:
<?php
/**
* Start the application
*/
require "../application/bootstrap.php";
Bootstrap::run($_SERVER["REQUEST_URI"]);
示例7: run
public function run()
{
parent::run();
}
示例8: dirname
<?php
/**
* White Label Transfer
* Index
*
* @author BizLogic <code@whitelabeltransfer.com>
* @copyright 2012 - 2014 BizLogic
* @link http://whitelabeltransfer.com
* @license GNU Affero General Public License v3
* @link https://www.gnu.org/licenses/agpl-3.0.txt
*
* @since Wednesday, July 06, 2011 / 10:17 AM GMT+1
* @edited $Date: 2011-11-03 14:59:43 +0100 (Thu, 03 Nov 2011) $
* @version $Id: index.php 4898 2011-11-03 13:59:43Z mknox $
*
* @package White Label Transfer
*/
define('PATH', dirname(__FILE__));
set_include_path(PATH . '/application/' . PATH_SEPARATOR . PATH . '/application/configs' . PATH_SEPARATOR . PATH . '/application/models' . PATH_SEPARATOR . PATH . '/library/' . PATH_SEPARATOR . get_include_path());
require_once 'Bootstrap.php';
$Bootstrap = new Bootstrap('');
$Bootstrap->run();
示例9: __autoload
<?php
require_once 'define.php';
require_once CONFIG_PATH . 'config.php';
date_default_timezone_set($config['time_zone']);
function __autoload($classname)
{
require_once LIBRARY_PATH . $classname . '.php';
}
Session::init();
$imports = $config['import'];
$app = new Bootstrap();
$app->import($imports);
$app->run();
示例10: microtime
<?php
$_SERVER['backend_start'] = microtime(true);
include __DIR__ . '/backend/include/all.php';
allow_origin(['webkameleon.com', 'ecco', 'fly']);
autoload([__DIR__ . '/classes', __DIR__ . '/controllers', __DIR__ . '/models']);
$config = json_config(__DIR__ . '/config/application.json');
$method = http_method();
if (in_array(strtolower(ini_get('magic_quotes_gpc')), array('1', 'on'))) {
$_POST = array_map('stripslashes', $_POST);
$_GET = array_map('stripslashes', $_GET);
$_COOKIE = array_map('stripslashes', $_COOKIE);
ini_set('magic_quotes_gpc', 0);
}
ini_set('display_errors', 1);
$bootstrap = new Bootstrap($config);
$result = $bootstrap->run(strtolower($method));
示例11: run
// return $this->map[$class];
//}
$class = ltrim($class, '\\');
foreach ($this->prefixes as $current) {
list($currentPrefix, $currentBaseDir) = $current;
if (0 === strpos($class, $currentPrefix)) {
$classWithoutPrefix = substr($class, strlen($currentPrefix));
$file = $currentBaseDir . str_replace('\\', DIRECTORY_SEPARATOR, $classWithoutPrefix) . '.class.php';
if (file_exists($file)) {
// $this->map[$class] = $file;
return $file;
}
}
}
return null;
}
public function run()
{
foreach (array("Example" => realpath(__DIR__ . "/../src/Example")) as $prefix => $path) {
$this->addNamespace('\\' . $prefix, $path);
}
$test = $this;
spl_autoload_register(function ($className) use($test) {
$test->loadClass($className);
//exit;
});
}
}
$b = new Bootstrap();
$b->run();
//requireRecursiveFromDirectory(realpath(__DIR__ . "/../src"));
示例12: run
<?php
namespace WebIt4MeTest;
class Bootstrap
{
public static function run($autoLoader)
{
include $autoLoader;
}
}
Bootstrap::run(__DIR__ . '/../vendor/autoload.php');
示例13: defined
defined('TMP') or define('TMP', STORAGE . 'tmp/');
defined('CACHE') or define('CACHE', STORAGE . 'cache/');
//defined('BIN') or define('BIN',realpath(ABSPATH.'../../').DS);
defined('BIN') or define('BIN', ABSPATH);
$errors = E_ALL ^ E_NOTICE ^ E_STRICT;
error_reporting($errors);
//ini_set('display_errors','Off');
ini_set('log_errors', 'On');
ini_set('error_log', LOG . 'error.log');
set_time_limit(0);
class Bootstrap
{
private static function acquire($file)
{
if (is_file($file)) {
return include $file;
}
}
public static function run()
{
if (!($loader = self::acquire(__DIR__ . '/../../vendor/autoload.php'))) {
echo 'You must set up project\'s dependencies first by running the following commands:' . PHP_EOL;
echo " curl -s https://getcomposer.org/installer | php\n";
echo " php composer.phar install\n";
exit(1);
}
return $loader;
}
}
return Bootstrap::run();
示例14: define
<?php
// app/console/index.php
try {
// Base path
if (!defined('BASEPATH')) {
define('BASEPATH', realpath(__DIR__ . '/../../'));
}
// Set the path to library
set_include_path(implode(PATH_SEPARATOR, array(BASEPATH . '/library', get_include_path())));
//Set timezone
date_default_timezone_set("UTC");
// Run Bootstrap
require_once 'Bootstrap.php';
$bootstrap = new Bootstrap();
$bootstrap->run();
} catch (\Exception $e) {
// catch and report any stray exceptions...
echo $e->getMessage();
}
示例15: ini_set
<?php
ini_set('display_errors', 1);
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', realpath(dirname(__FILE__)) . DS);
define('APP_PATH', ROOT . 'application' . DS);
define('TIMEZONE', 'Europe/Madrid');
try {
require_once APP_PATH . 'Autoload.php';
require_once APP_PATH . 'Config.php';
/* Configurar parametros de hora del sistema */
date_default_timezone_set(TIMEZONE);
Session::init();
$registry = Registry::getInstancia();
$registry->_request = new Request();
$registry->_db = new Database(DB_HOST, DB_NAME, DB_USER, DB_PASS, DB_CHAR);
$registry->_acl = new ACL();
Bootstrap::run($registry->_request);
} catch (Exception $e) {
echo $e->getMessage();
}