当前位置: 首页>>代码示例>>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;未经允许,请勿转载。