-
Notifications
You must be signed in to change notification settings - Fork 32
/
sami.cfg.php
45 lines (37 loc) · 1.17 KB
/
sami.cfg.php
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
<?php
use Sami\Sami;
use Sami\Parser\Filter\TrueFilter;
use Sami\Reflection\MethodReflection;
use Sami\Reflection\PropertyReflection;
use Sami\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;
class HyperwalletSdkFilter extends TrueFilter {
public function acceptMethod(MethodReflection $method) {
return $method->isPublic() && !$method->getTags('internal');
}
public function acceptProperty(PropertyReflection $property) {
return $property->isPublic() && !$property->getTags('internal');
}
}
$iterator = Finder::create()
->files()
->name('*.php')
->exclude('Tests')
->in($dir = __DIR__ . '/src')
;
$versions = GitVersionCollection::create($dir)
->addFromTags('v*')
->add('master', 'master branch')
;
$sami = new Sami($iterator, array(
'theme' => 'default',
'versions' => $versions,
'title' => 'Hyperwallet REST SDK',
'build_dir' => __DIR__ . '/docs/%version%',
'cache_dir' => __DIR__. ' /build/docs/%version%',
'default_opened_level' => 1,
));
$sami['filter'] = function () {
return new HyperwalletSdkFilter();
};
return $sami;