$compiled = [
'paths' => [
realpath(base_path('resources/views')),
],
'compiled' => realpath(storage_path('framework/views')),
];
if(SAE){
$compiled['compiled'] = 'saestor://'.SAE_STORAGE.'/compiled';
}
return $compiled;
namespace Illuminate\Cloud\SAE;
use App\Http\Kernel as DefaultKernel;
class Kernel extends DefaultKernel{
/**
* The bootstrap classes for the application.
*
* @var array
*/
protected $bootstrappers = [
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
'Illuminate\Cloud\SAE\Log\ConfigureLogging',
'Illuminate\Foundation\Bootstrap\HandleExceptions',
'Illuminate\Foundation\Bootstrap\RegisterFacades',
'Illuminate\Foundation\Bootstrap\RegisterProviders',
'Illuminate\Foundation\Bootstrap\BootProviders',
];
}
class Writer extends IlluminateLogWriter {
protected function useSaeLog($level = 'debug'){
$level = $this->parseLevel($level);
$this->monolog->pushHandler($handler = new SaeLogHandler($level));
$handler->setFormatter($this->getDefaultFormatter());
}
public function useFiles($path, $level = 'debug'){
if (SAE) {
return $this->useSaeLog($level);
}
parent::useFiles($path, $level);
}
public function useDailyFiles($path, $days = 0, $level = 'debug'){
if (SAE) {
return $this->useSaeLog($level);
}
parent::useDailyFiles($path, $days, $level);
}
}
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| 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.
|
*/
define('SAE',true);
define('SAE_STORAGE', 'laravel');
if(SAE){
$app = new Illuminate\Cloud\SAE\Application(
realpath(__DIR__.'/../')
);
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
Illuminate\Cloud\SAE\Kernel::class
);
}else{
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
);
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
}
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
if(SAE){
$removeProviders = [
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
];
for($i = 0; $i < count($app['providers']); $i++){
if (in_array($app['providers'][$i], $removeProviders)) {
unset($app['providers'][$i]);
}
}
$app['providers'] = array_merge($app['providers'],[
Illuminate\Cloud\SAE\Cache\SaeCacheServiceProvider::class,
Illuminate\Cloud\SAE\Session\SessionServiceProvider::class,
Illuminate\Cloud\SAE\Storage\StorageServiceProvider::class,
Illuminate\Cloud\SAE\Segment\SegmentServiceProvider::class,
]);
$app['aliases']['Storage'] = Illuminate\Cloud\SAE\Storage\Storage::class;
$app['aliases']['Segment'] = Illuminate\Cloud\SAE\Segment\Segment::class;
}
handle: - rewrite: if (path ~ "^/$") goto "public/index.php" - rewrite: if(!is_dir() && !is_file() && path~"^(.*)$") goto "public/index.php/$1"
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有