ConfigProvider.php 993 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. namespace Hyperf\Watcher;
  12. use Hyperf\Watcher\Command\WatchCommand;
  13. use Hyperf\Watcher\Listener\ReloadDotenvListener;
  14. class ConfigProvider
  15. {
  16. public function __invoke(): array
  17. {
  18. return [
  19. 'dependencies' => [
  20. ],
  21. 'commands' => [
  22. WatchCommand::class,
  23. ],
  24. 'listeners' => [
  25. ReloadDotenvListener::class,
  26. ],
  27. 'publish' => [
  28. [
  29. 'id' => 'config',
  30. 'description' => 'The config for watcher.',
  31. 'source' => __DIR__ . '/../publish/watcher.php',
  32. 'destination' => BASE_PATH . '/.watcher.php',
  33. ],
  34. ],
  35. ];
  36. }
  37. }