PluginProbe
WPIDE – File Manager & Code Editor / 3.2
WPIDE – File Manager & Code Editor v3.2
3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 3.4 All 54 releases
wpide / _services.php

_services.php in WPIDE – File Manager & Code Editor 3.2, at _services.php

124 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 use WPIDE\App\Services\Storage\LocalFileSystem;
5
6 use const WPIDE\Constants\DIR;
7 use const WPIDE\Constants\SLUG;
8 use const WPIDE\Constants\TMP_DIR;
9
10 return [
11 'WPIDE\App\Services\Logger\LoggerInterface' => [
12 'handler' => '\WPIDE\App\Services\Logger\Adapters\MonoLogger',
13 'config' => [
14 'monolog_handlers' => [
15 function () {
16 return new \Monolog\Handler\StreamHandler(
17 ini_get('error_log'),
18 \Monolog\Logger::DEBUG
19 );
20 },
21 ],
22 ],
23 ],
24 'WPIDE\App\Services\Cors\Cors' => [
25 'handler' => '\WPIDE\App\Services\Cors\Cors',
26 'config' => [
27 'enabled' => defined('WP_DEBUG') && WP_DEBUG,
28 ],
29 ],
30 'WPIDE\App\Services\Tmpfs\TmpfsInterface' => [
31 'handler' => '\WPIDE\App\Services\Tmpfs\Adapters\Tmpfs',
32 'config' => [
33 'path' => TMP_DIR,
34 'gc_probability_perc' => 10,
35 'gc_older_than' => 60 * 60 * 24 * 2, // 2 days
36 ],
37 ],
38 'WPIDE\App\Services\Security\Security' => [
39 'handler' => '\WPIDE\App\Services\Security\Security',
40 'config' => [
41 'ip_allowlist' => [],
42 'ip_denylist' => []
43 ],
44 ],
45 'WPIDE\App\Services\View\ViewInterface' => [
46 'handler' => '\WPIDE\App\Services\View\Adapters\Vuejs',
47 'config' => [],
48 ],
49 'WPIDE\App\Services\Storage\Filesystem' => [
50 'handler' => '\WPIDE\App\Services\Storage\Filesystem',
51 'config' => LocalFileSystem::getConfig(
52 null,
53 [
54 'dirs' => LocalFileSystem::excludedDirs(),
55 'files' => LocalFileSystem::excludedFiles()
56 ]
57 ),
58 ],
59 // 'WPIDE\App\Services\Storage\Filesystem' => [
60 // 'handler' => '\WPIDE\App\Services\Storage\Filesystem',
61 // 'config' => [
62 // 'separator' => '/',
63 // 'config' => [],
64 // 'adapter' => function () {
65 // $client = new \Aws\S3\S3Client([
66 // 'credentials' => [
67 // 'key' => AWS_ACCESS_KEY,
68 // 'secret' => AWS_SECRET_KEY
69 // ],
70 // 'region' => 'us-east-1',
71 // 'version' => 'latest',
72 // ]);
73 //
74 // return new \League\Flysystem\AwsS3v3\AwsS3Adapter($client, 'bervana');
75 // },
76 // ],
77 // ],
78 'WPIDE\App\Services\Database\Database' => [
79 'handler' => '\WPIDE\App\Services\Database\Database',
80 'config' => [],
81 ],
82 // 'WPIDE\App\Services\Database\DatabaseApi' => [
83 // 'handler' => '\WPIDE\App\Services\Database\DatabaseApi',
84 // 'config' => [
85 // 'username' => DB_USER,
86 // 'password' => DB_PASSWORD,
87 // 'database' => DB_NAME,
88 // 'address' => DB_HOST
89 // ]
90 // ],
91
92 'WPIDE\App\Services\Cache\Cache' => [
93 'handler' => '\WPIDE\App\Services\Cache\Cache',
94 'config' => [
95 'group' => SLUG
96 ],
97 ],
98 'WPIDE\App\Services\Transient\Transient' => [
99 'handler' => '\WPIDE\App\Services\Transient\Transient',
100 'config' => [
101 'prefix' => SLUG.'_'
102 ],
103 ],
104 'WPIDE\App\Services\Archiver\ArchiverInterface' => [
105 'handler' => '\WPIDE\App\Services\Archiver\Adapters\ZipArchiver',
106 'config' => [],
107 ],
108 'WPIDE\App\Services\Auth\AuthInterface' => [
109 'handler' => '\WPIDE\App\Services\Auth\Adapters\WPAuth',
110 'config' => [
111 'wp_dir' => ABSPATH,
112 'permissions' => ['read', 'write', 'upload', 'download', 'batchdownload', 'zip'],
113 'private_repos' => false,
114 ],
115 ],
116 'WPIDE\App\Services\Router\Router' => [
117 'handler' => '\WPIDE\App\Services\Router\Router',
118 'config' => [
119 'query_param' => 'req',
120 'routes_file' => DIR.'_routes.php',
121 ],
122 ],
123 ];
124