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


PHP ServiceProvider::pathsToPublish方法代碼示例

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


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

示例1: test_it_should_publish_the_config_path

 public function test_it_should_publish_the_config_path()
 {
     $this->appMock->shouldReceive('routesAreCached')->andReturn(true);
     $this->appMock->shouldReceive('call');
     $this->sp->boot($this->routerMock);
     $paths = ServiceProvider::pathsToPublish(RouteBinderServiceProvider::class, 'config');
     $this->assertArrayHasKey(dirname(__DIR__) . '/config/routes.php', $paths);
     $this->assertContains('/config/routes.php', $paths);
 }
開發者ID:guiwoda,項目名稱:route-binder,代碼行數:9,代碼來源:RouteBinderServiceProviderTest.php

示例2: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $paths = ServiceProvider::pathsToPublish($this->option('provider'), $this->option('tag'));
     foreach ($paths as $from => $to) {
         if ($this->files->isFile($from)) {
             $this->publishFile($from, $to);
         } elseif ($this->files->isDirectory($from)) {
             $this->publishDirectory($from, $to);
         }
     }
     $this->info('Publishing Complete!');
 }
開發者ID:fparralejo,項目名稱:btrabajo,代碼行數:17,代碼來源:VendorPublishCommand.php

示例3: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $paths = ServiceProvider::pathsToPublish($this->option('provider'), $this->option('tag'));
     if (empty($paths)) {
         return $this->comment("Nothing to publish.");
     }
     foreach ($paths as $from => $to) {
         if ($this->files->isFile($from)) {
             $this->publishFile($from, $to);
         } elseif ($this->files->isDirectory($from)) {
             $this->publishDirectory($from, $to);
         } else {
             $this->error("Can't locate path: <{$from}>");
         }
     }
     $this->info('Publishing Complete!');
 }
開發者ID:HarveyCheng,項目名稱:myblog,代碼行數:22,代碼來源:VendorPublishCommand.php

示例4: publishTag

 /**
  * Publishes the assets for a tag.
  *
  * @param string $tag
  *
  * @return mixed
  */
 private function publishTag($tag)
 {
     $paths = ServiceProvider::pathsToPublish($this->option('provider'), $tag);
     if (empty($paths)) {
         return $this->comment("Nothing to publish for tag [{$tag}].");
     }
     foreach ($paths as $from => $to) {
         if ($this->files->isFile($from)) {
             $this->publishFile($from, $to);
         } elseif ($this->files->isDirectory($from)) {
             $this->publishDirectory($from, $to);
         } else {
             $this->error("Can't locate path: <{$from}>");
         }
     }
     $this->info("Publishing complete for tag [{$tag}]!");
 }
開發者ID:19peaches,項目名稱:lumineer,代碼行數:24,代碼來源:VendorPublishCommand.php

示例5: handlePublishes

 protected function handlePublishes()
 {
     if ($this->published) {
         return;
     }
     $pathsToPublish = ServiceProvider::pathsToPublish($this->extension->namespace);
     $this->ensurePathsExistence(array_keys($pathsToPublish));
     \Artisan::call('vendor:publish', ['--provider' => $this->extension->namespace]);
     // Ensure the paths exist
     $this->waitUntilPathsExist(array_values($pathsToPublish));
     $this->published = true;
 }
開發者ID:marcmascarell,項目名稱:laravel-artificer,代碼行數:12,代碼來源:ResourceInstaller.php

示例6: testPublishedPathsAssets

 public function testPublishedPathsAssets()
 {
     $paths = ServiceProvider::pathsToPublish('NewMarket\\Content\\Providers\\ContentServiceProvider', 'assets');
     $this->assertTrue(count($paths) > 0);
 }
開發者ID:newmarkets,項目名稱:content,代碼行數:5,代碼來源:ServiceProviderTest.php


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