|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Aist Filesystem Component (http://mateuszsitek.com/projects/filesystem) |
|
5
|
|
|
* |
|
6
|
|
|
* @copyright Copyright (c) 2017 DIGITAL WOLVES LTD (http://digitalwolves.ltd) All rights reserved. |
|
7
|
|
|
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
namespace Aist\Filesystem; |
|
11
|
|
|
|
|
12
|
|
|
use Aist\Filesystem\Console\Command\CopyCommand; |
|
13
|
|
|
use Aist\Filesystem\Console\Command\DumpFileCommand; |
|
14
|
|
|
use Aist\Filesystem\Console\Helper\FilesystemHelper; |
|
15
|
|
|
use Aist\Filesystem\Console\Helper\FilesystemHelperFactory; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* ConfigProvider for Aist Queue |
|
19
|
|
|
*/ |
|
20
|
|
|
class ConfigProvider |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* Returns the configuration array |
|
24
|
|
|
* |
|
25
|
|
|
* To add a bit of a structure, each section is defined in a separate |
|
26
|
|
|
* method which returns an array with its configuration. |
|
27
|
|
|
* |
|
28
|
|
|
* @return array |
|
29
|
|
|
*/ |
|
30
|
|
|
public function __invoke() |
|
31
|
|
|
{ |
|
32
|
|
|
return [ |
|
33
|
|
|
'dependencies' => $this->getDependencies(), |
|
34
|
|
|
'console' => [ |
|
35
|
|
|
'commands' => $this->getCommands(), |
|
36
|
|
|
'helpers' => $this->getHelpers(), |
|
37
|
|
|
], |
|
38
|
|
|
]; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Returns the container dependencies |
|
43
|
|
|
* |
|
44
|
|
|
* @return array |
|
45
|
|
|
*/ |
|
46
|
|
|
public function getDependencies() |
|
47
|
|
|
{ |
|
48
|
|
|
return [ |
|
49
|
|
|
'invokables' => [ |
|
50
|
|
|
], |
|
51
|
|
|
'factories' => [ |
|
52
|
|
|
FilesystemHelper::class => FilesystemHelperFactory::class, |
|
53
|
|
|
], |
|
54
|
|
|
]; |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* Returns the commands array |
|
59
|
|
|
* |
|
60
|
|
|
* @return array |
|
61
|
|
|
*/ |
|
62
|
|
|
public function getCommands() |
|
63
|
|
|
{ |
|
64
|
|
|
return [ |
|
65
|
|
|
CopyCommand::class, |
|
66
|
|
|
DumpFileCommand::class, |
|
67
|
|
|
]; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* Returns the helpers array |
|
72
|
|
|
* |
|
73
|
|
|
* @return array |
|
74
|
|
|
*/ |
|
75
|
|
|
public function getHelpers() |
|
76
|
|
|
{ |
|
77
|
|
|
return [ |
|
78
|
|
|
'filesystem' => FilesystemHelper::class, |
|
79
|
|
|
]; |
|
80
|
|
|
} |
|
81
|
|
|
} |
|
82
|
|
|
|