當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::publicPath方法代碼示例

本文整理匯總了PHP中Illuminate\Contracts\Foundation\Application::publicPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::publicPath方法的具體用法?PHP Application::publicPath怎麽用?PHP Application::publicPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Contracts\Foundation\Application的用法示例。


在下文中一共展示了Application::publicPath方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: compileScriptMaterial

 /**
  * @return \Illuminate\Support\Collection
  */
 protected function compileScriptMaterial()
 {
     $files = new Collection();
     $this->layoutJsMaterial->merge($this->defaultJsMaterial)->merge($this->extendJsMaterial)->each(function ($value) use($files) {
         $files->push($this->findPath($value));
     });
     $code = md5($files);
     $this->dispatcher->listen('kernel.handled', function () use($code, $files) {
         $dictionary = new Collection();
         $dictionary->push($this->application->publicPath());
         $dictionary->push('cache');
         $dictionary = $this->pathSplit($code, '2,2,2,2,2,2', $dictionary);
         $dictionary = $dictionary->implode(DIRECTORY_SEPARATOR);
         if (!$this->files->isDirectory($dictionary)) {
             $this->files->makeDirectory($dictionary, 0755, true, true);
         }
         $file = $dictionary . DIRECTORY_SEPARATOR . Str::substr($code, 12, 20) . '.js';
         $key = 'cache.script.' . $code;
         if (!$this->files->exists($file) || !$this->cache->has($key) && $this->application->inDebugMode()) {
             $content = $this->compileScript($files);
             $expires = Carbon::now()->addMinutes(10);
             $this->cache->put($key, $content, $expires);
             file_put_contents($file, $content);
         }
     });
     return $this->pathSplit($code, '2,2,2,2,2,2,20', Collection::make(['cache']))->implode('/') . '.js';
 }
開發者ID:darrengopower,項目名稱:framework,代碼行數:30,代碼來源:Material.php

示例2: 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

示例3: publishAssets

 protected function publishAssets()
 {
     $this->filesystem->copyDirectory($this->application->basePath() . '/vendor/components/font-awesome/fonts', $this->application->publicPath() . '/assets/fonts');
 }
開發者ID:Luceos,項目名稱:core,代碼行數:4,代碼來源:InstallCommand.php


注:本文中的Illuminate\Contracts\Foundation\Application::publicPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。