Skip to content

Commit 38640a4

Browse files
authored
Create generate-config.php
1 parent c4e3551 commit 38640a4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

generate-config.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
$outputFile = $argv[1];
4+
$classesListFile = $argv[2];
5+
$rootNamespace = $argv[3];
6+
$outputDocsPath = $argv[4];
7+
8+
shell_exec('mkdir -p "' . $outputDocsPath . '"');
9+
10+
$outputDocsPath = realpath($outputDocsPath);
11+
12+
file_put_contents(
13+
$outputFile,
14+
'<?php' . PHP_EOL .
15+
PHP_EOL .
16+
'return (object)' . var_export(
17+
[
18+
'rootNamespace' => $rootNamespace,
19+
'destDirectory' => $outputDocsPath,
20+
'format' => 'github',
21+
'classes' => file($outputFile),
22+
],
23+
true
24+
) . ';' ;
25+
);

0 commit comments

Comments
 (0)