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


PHP Application::storagePath方法代码示例

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


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

示例1: handle

 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if ($this->application->isDownForMaintenance()) {
         $data = json_decode(file_get_contents($this->application->storagePath() . '/bootstraps/down'), true);
         throw new MaintenanceModeException($data['time'], $data['retry'], $data['message']);
     }
     return $next($request);
 }
开发者ID:notadd,项目名称:framework,代码行数:17,代码来源:CheckForMaintenanceMode.php

示例2: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (file_exists($this->app->storagePath() . '/framework/readonly')) {
         if ($request->method() != 'GET') {
             throw new RequestNotAllowedException();
         }
     }
     return $next($request);
 }
开发者ID:pmall,项目名称:readonly,代码行数:16,代码来源:CheckForReadonlyMode.php

示例3: bootstrap

 public function bootstrap(Application $app)
 {
     $this->app = $app;
     $this->fs = new Filesystem();
     $paths = [$app->exportPath(), $app->homePath(), $app->storagePath(), $app->databasePath(), $app->publicPath(), $app->configPath()];
     foreach ($paths as $path) {
         $this->ensureDirectory($path);
     }
     $storagePaths = ['app', 'framework', 'framework/cache', 'framework/views', 'framework/sessions', 'logs', $app->getSlug()];
     foreach ($storagePaths as $path) {
         $this->ensureDirectory(path_join($app->storagePath(), $path));
     }
 }
开发者ID:laradic-old,项目名称:illuminate,代码行数:13,代码来源:EnsureDirectories.php

示例4: getChunkPath

 /**
  * getChunkPath.
  *
  * @method getChunkPath
  *
  * @return string
  */
 protected function getChunkPath()
 {
     $path = $this->app->storagePath() . '/uploadchunks/';
     if ($this->filesystem->isDirectory($path) === false) {
         $this->filesystem->makeDirectory($path, 0755, true, true);
     }
     return $path;
 }
开发者ID:recca0120,项目名称:laravel-upload,代码行数:15,代码来源:ApiAdapter.php

示例5: configureCustomHandler

 /**
  * Custom handler for integrating LogEntries
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param NrgiWriter                                    $log
  */
 public function configureCustomHandler(Application $app, NrgiWriter $log)
 {
     if (env('APP_ENV') == 'production') {
         $handler = $this->logglyHandler();
         $log->getMonolog()->pushHandler($handler);
     }
     $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', $app->make('config')->get('app.log_max_files', 5));
 }
开发者ID:sadhakbj,项目名称:resourcecontracts.org,代码行数:14,代码来源:ConfigureLogging.php

示例6: configureCustomHandler

 /**
  * Custom Monolog handler .
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  * @param AsWriter|\Illuminate\Log\Writer              $log
  */
 public function configureCustomHandler(Application $app, AsWriter $log)
 {
     if (!env('APP_DEBUG')) {
         $handler = new LogEntriesHandler(getenv('LOGENTRY_TOKEN'));
         $log->getMonolog()->pushHandler($handler);
     }
     // Also Log to Daily files too.
     $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', 5);
 }
开发者ID:younginnovations,项目名称:aidstream,代码行数:15,代码来源:ConfigureLogging.php

示例7: configureHandlers

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @param  \Illuminate\Log\Writer  $log
  * @return void
  */
 protected function configureHandlers(Application $app, Writer $log)
 {
     // Stream handlers
     $logPath = $app->storagePath() . '/logs/app.log';
     $logLevel = Monolog::INFO;
     $logStreamHandler = new StreamHandler($logPath, $logLevel);
     // push handlers
     $logger = $log->getMonolog();
     $logger->pushHandler($logStreamHandler);
 }
开发者ID:Kenneth058,项目名称:adminclubinnova,代码行数:17,代码来源:ConfigureLogging.php

示例8: configureDailyHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app        	
  * @param \Illuminate\Log\Writer $log        	
  * @return void
  */
 protected function configureDailyHandler(Application $app, Writer $log)
 {
     $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', $app->make('config')->get('app.log_max_files', 5));
 }
开发者ID:sapwoo,项目名称:portfolio,代码行数:11,代码来源:ConfigureLogging.php

示例9: configureAppenginemvmHandler

 /**
  * Custom Monolog handler that for AppEngine ManagedVMs.
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param  \Illuminate\Log\Writer $log
  *
  * @return void
  */
 protected function configureAppenginemvmHandler(Application $app, Writer $log)
 {
     // Log to designated
     $log->useFiles($app->storagePath() . '/logs/laravel.log');
     $log->useFiles('/var/log/app_engine/custom_logs/laravel.log');
 }
开发者ID:cedricziel,项目名称:l5-appengine-mvm-loghandler,代码行数:14,代码来源:LoggingConfiguration.php

示例10: configureDailyHandler

 /**
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app
  * @param \Illuminate\Log\Writer                                                      $log
  *
  * @return void
  */
 protected function configureDailyHandler(Application $app, Writer $log)
 {
     $config = $app->make('config');
     $maxFiles = $config->get('app.log_max_files');
     $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', is_null($maxFiles) ? 5 : $maxFiles, $config->get('app.log_level', 'debug'));
 }
开发者ID:notadd,项目名称:framework,代码行数:12,代码来源:ConfigureLogging.php

示例11: configureDailyHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @param  \Illuminate\Log\Writer  $log
  * @return void
  */
 protected function configureDailyHandler(Application $app, Writer $log)
 {
     $log->useDailyFiles($app->storagePath() . '/logs/laravel.log', 5);
 }
开发者ID:HarveyCheng,项目名称:myblog,代码行数:11,代码来源:ConfigureLogging.php

示例12: __construct

 /**
  * Compiler constructor.
  * @param \Illuminate\Contracts\Foundation\Application $application
  */
 public function __construct(Application $application)
 {
     $this->js = new JsCompiler();
     $this->less = new LessCompiler(['cache_dir' => $application->storagePath() . DIRECTORY_SEPARATOR . 'less', 'compress' => true, 'strictMath' => true]);
     $this->sass = new SassCompiler();
 }
开发者ID:darrengopower,项目名称:framework,代码行数:10,代码来源:Compiler.php

示例13: configureSingleHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param  \Illuminate\Log\Writer                       $log
  *
  * @return void
  */
 protected function configureSingleHandler(Application $app, Writer $log)
 {
     $log->useFiles($app->storagePath() . '/logs/firefly-iii.log', $app->make('config')->get('app.log_level', 'debug'));
 }
开发者ID:roberthorlings,项目名称:firefly-iii,代码行数:12,代码来源:ConfigureLogging.php

示例14: isReadOnlyModeEnabled

 public function isReadOnlyModeEnabled()
 {
     return file_exists($this->app->storagePath() . '/framework/readonly');
 }
开发者ID:vegax87,项目名称:Strimoid,代码行数:4,代码来源:CheckForReadOnlyMode.php

示例15: configureDailyHandler

 /**
  * Configure the Monolog handlers for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application $app
  * @param  \Illuminate\Log\Writer                       $log
  * @return void
  */
 protected function configureDailyHandler(Application $app, Writer $log)
 {
     $fileName = php_sapi_name();
     $log->useDailyFiles($app->storagePath() . '/logs/' . $fileName . '.log', $app->make('config')->get('app.log_max_files', 5));
 }
开发者ID:arasmit2453,项目名称:deployer,代码行数:12,代码来源:ConfigureLogging.php


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