-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocBlock.php
More file actions
executable file
·30 lines (26 loc) · 825 Bytes
/
docBlock.php
File metadata and controls
executable file
·30 lines (26 loc) · 825 Bytes
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
#!/usr/bin/php
<?php
require_once 'PHP/DocBlockGenerator.php';
$param = array(
'license' => 'bsd',
'version' => 'svn',
'category' => 'DnDEngine',
'author' => 'Sascha Grossenbacher',
'email' => 'saschagros@gmail.com',
'year' => '2008'
);
$gen = new PHP_DocBlockGenerator();
docDirectory($gen, $param, 'DnDEngine');
docDirectory($gen, $param, 'tests');
function docDirectory($gen, $param, $directory)
{
$dir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));
foreach($dir as $file) {
if (false === strpos($file, '.svn') && false === strpos($file, 'www/api') && '.php' == substr($file, -4)) {
echo 'Generate DocBlock for ' . $file . '...';
$gen->generate($file->__toString() , $param);
echo "Done\n";
}
}
}
?>