<?php

use Sami\Sami;
use Sami\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;

$iterator = Finder::create()
    ->files()
    ->name('*.php')
    ->exclude('build')
    ->exclude('vendor')
    ->exclude('tests')
    ->exclude('framework')
    ->in($dir = __DIR__);

$versions = GitVersionCollection::create($dir)
    ->addFromTags('*')
    ->add('master', 'master branch');

return new Sami($iterator, array(
    'title'                => 'Cache Include API',
    'versions'             => $versions,
    'theme'                => 'enhanced',
    'build_dir'            => __DIR__ . '/../api/%version%',
    'cache_dir'            => __DIR__ . '/../apicache/%version%',
    'default_opened_level' => 2,
));