示例#1
0
 /**
  * Bootstrap the test environemnt:
  * - Create an application instance and register it within itself.
  * - Register the package service provider with the app.
  * - Set the APP facade.
  *
  * @return void
  */
 public function setUp()
 {
     $app = new Illuminate\Foundation\Application();
     $app->instance('app', $app);
     $app->register('Codesleeve\\Stapler\\StaplerServiceProvider');
     Illuminate\Support\Facades\Facade::setFacadeApplication($app);
 }
示例#2
0
 /**
  * Bootstrap the test environemnt:
  * - Create an application instance and register it within itself.
  * - Register the package service provider with the app.
  * - Set the APP facade.
  *
  * @return void
  */
 public function setUp()
 {
     $app = new Illuminate\Foundation\Application();
     $app->instance('app', $app);
     $app->register('Expstudio\\LaraClip\\LaraClipServiceProvider');
     Illuminate\Support\Facades\Facade::setFacadeApplication($app);
 }
示例#3
0
<?php

define('LARAVEL_START', microtime(true));
require __DIR__ . '/vendor/autoload.php';
$app = new Illuminate\Foundation\Application(realpath(__DIR__));
$app->instance('path.public', __DIR__ . '/..');
$middleware = ['Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode', 'Illuminate\\Cookie\\Middleware\\EncryptCookies', 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse', 'Illuminate\\Session\\Middleware\\StartSession', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession'];
$bootstrappers = ['Illuminate\\Foundation\\Bootstrap\\DetectEnvironment', 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\ConfigureLogging', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders'];
$app->bootstrapWith($bootstrappers);
use Illuminate\Foundation\Console\Kernel as IlluminateConsoleKernel;
class ConsoleKernel extends IlluminateConsoleKernel
{
    protected $commands = [];
}
$app->singleton('Illuminate\\Contracts\\Http\\Kernel', 'HttpKernel');
$app->singleton('Illuminate\\Contracts\\Console\\Kernel', 'ConsoleKernel');
$app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'Illuminate\\Foundation\\Exceptions\\Handler');
return $app;
示例#4
0
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application();
/*
|--------------------------------------------------------------------------
| Define The Application Path
|--------------------------------------------------------------------------
|
| Here we just defined the path to the application directory. Most likely
| you will never need to change this value as the default setup should
| work perfectly fine for the vast majority of all our applications.
|
*/
$app->instance('path', $appPath = __DIR__ . '/app');
$app->instance('path.base', __DIR__);
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name or HTTP host that matches a
| given environment, then we will automatically detect it for you.
|
*/
$env = $app->detectEnvironment(array('local' => array('localhost', '*.dev', '*.app')));
/*
|--------------------------------------------------------------------------
| Load The Application