當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。