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


PHP App::run方法代码示例

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


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

示例1: testRun

 public function testRun()
 {
     $stub = \Mockery::mock('Load');
     $stub->shouldReceive('loadExceptionHandler')->once();
     $stub->shouldReceive('loadRegistry')->once();
     $stub->shouldReceive('loadSession')->once();
     $stub->shouldReceive('loadHttp')->once();
     $stub->shouldReceive('loadView')->once();
     $stub->shouldReceive('loadUser')->once();
     $stub->shouldReceive('loadAdmin')->once();
     $stub->shouldReceive('loadFrontController')->once();
     $stub->shouldReceive('loadTheme')->once();
     MockTest::inject($this->app, 'load', $stub);
     $this->app->run();
 }
开发者ID:ignaszak,项目名称:cms,代码行数:15,代码来源:AppTest.php

示例2: App

<?php

session_start();
require '../vendor/autoload.php';
use app\App;
$app = new App();
echo $app->run();
开发者ID:Ravend6,项目名称:junior_test,代码行数:7,代码来源:index.php

示例3:

error_reporting(E_ALL);
if (PHP_SAPI == 'cli-server') {
    // To help the built-in PHP dev server, check if the request was actually for
    // something which should probably be served as a static file
    $file = __DIR__ . $_SERVER['REQUEST_URI'];
    if (is_file($file)) {
        return false;
    }
}
require __DIR__ . '/../vendor/autoload.php';
session_start();
// Instantiate the app
$settings = __DIR__ . '/../config/settings.php';
if (!is_file($settings)) {
    $defaults = (require __DIR__ . '/../config/settings.php.dist');
    $defaults['settings']['jwt']['key'] = base64_encode(Random::secure_random_bytes(64));
    file_put_contents($settings, '<?php' . "\n" . 'return ' . var_export($defaults, true) . ';');
}
$app = new \Slim\App(require $settings);
SlimStatic::boot($app);
// Allow static proxies to be called from anywhere in App
Statical::addNamespace('*', __NAMESPACE__ . '\\*');
// Set up dependencies
require __DIR__ . '/../src/dependencies.php';
// Register middleware
require __DIR__ . '/../src/middleware.php';
// Register routes
require __DIR__ . '/../src/routes.php';
// Run app
App::run();
开发者ID:beaver-dev,项目名称:featherbb-marketplace,代码行数:30,代码来源:index.php

示例4: dirname

<?php

use App\App;
require dirname(__FILE__) . "/vendor/autoload.php";
$app = new App(array('DB_DRIVER' => 'pdo_mysql', 'DB_HOST' => 'localhost', 'DB_USER' => 'root', 'DB_PASS' => 'root', 'DB_NAME' => 'slim_doctrine'));
$app->run();
开发者ID:PsykoSoldi3r,项目名称:slim-doctrine-demo,代码行数:6,代码来源:index.php

示例5:

<?php

/**
 * Индексный файл, точка входа в приложение веб-сайта
 */
require_once __DIR__ . '/../init.php';
\app\App::run();
开发者ID:gugglegum,项目名称:demosite,代码行数:7,代码来源:index.php

示例6: can_return_secret_of_the_universe

 /**
  * @test
  */
 public function can_return_secret_of_the_universe()
 {
     $app = new App();
     $this->assertEquals(42, $app->run());
 }
开发者ID:xiabin,项目名称:Ci-Php-Phing-Example,代码行数:8,代码来源:AppTest.php


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