forked from gizmore/phpgdo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproviders.php
More file actions
48 lines (41 loc) · 1.03 KB
/
providers.php
File metadata and controls
48 lines (41 loc) · 1.03 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
45
46
<?php
/**
* This prints all modules and their providers.
* The list can be copied by authors to Core/ModuleProviders.php
*/
use GDO\Util\Filewalker;
use GDO\Util\Regex;
# Bootstrap GDOv7
require "protected/config.php";
require "GDO7.php";
global $mode;
/** @var $argv string **/
$mode = @$argv[1];
if ($mode)
{
echo "'Captcha' => ['phpgdo-captcha', 'phpgdo-recaptcha2'],\n";
echo "'DBMS' => ['phpgdo-mysql', 'phpgdo-postgres', 'phpgdo-sqlite'],\n";
echo "'Mailer' => ['phpgdo-mailer', 'phpgdo-mailer-symfony'],\n";
echo "'Session' => ['phpgdo-session-db', 'phpgdo-session-cookie'],\n";
}
Filewalker::traverse("GDO", null, null,
function ($entry, $fullpath)
{
if (is_dir('GDO/' . $entry . "/.git"))
{
global $mode;
$c = file_get_contents('GDO/' . $entry . "/.git/config");
$c = Regex::firstMatch('#/gizmore/([-_a-z0-9]+)#miD', $c);
if (!str_starts_with($entry, 'phpgdo-'))
{
if (!$mode)
{
echo "$entry - < https://github.com/gizmore/$c >\n";
}
else
{
echo "'" . $entry . "' => '$c',\n";
}
}
}
}, 0);