-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigProvider.php
More file actions
44 lines (40 loc) · 1.34 KB
/
ConfigProvider.php
File metadata and controls
44 lines (40 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
/**
* This file is part of friendsofhyperf/components.
*
* @link https://github.com/friendsofhyperf/components
* @document https://github.com/friendsofhyperf/components/blob/main/README.md
* @contact [email protected]
*/
namespace FriendsOfHyperf\WebTinker;
use Hyperf\Contract\ConfigInterface;
class ConfigProvider
{
public function __invoke()
{
return [
'commands' => [
Console\InstallCommand::class,
],
'dependencies' => [
OutputModifiers\OutputModifier::class => function ($container) {
$config = $container->get(ConfigInterface::class);
$outputModifier = $config->get('web-tinker.output_modifier', OutputModifiers\PrefixDateTime::class);
return $container->get($outputModifier);
},
],
'listeners' => [
Listener\RegisterRoutesListener::class => -1,
],
'publish' => [
[
'id' => 'config',
'description' => 'The config for web-tinker.',
'source' => __DIR__ . '/../publish/web-tinker.php',
'destination' => BASE_PATH . '/config/autoload/web-tinker.php',
],
],
];
}
}