2011-07-04 06:58:15 +02:00
|
|
|
# Configuration Options
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
## Registering what to document
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
By default the documentation system will parse all the directories in your project
|
|
|
|
and include the documentation. If you want to only specify a few folders you can
|
|
|
|
disable it and register your paths manually
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
:::php
|
|
|
|
// turns off automatic parsing of filesystem
|
2010-06-24 16:22:41 +02:00
|
|
|
DocumentationService::set_automatic_registration(false);
|
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
// registers module 'sapphire'
|
|
|
|
try {
|
|
|
|
DocumentationService::register("sapphire", BASE_PATH ."/sapphire/docs/", 'trunk');
|
|
|
|
|
|
|
|
} catch(InvalidArgumentException $e) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
If you only want to disable documentation for one module you can correspondingly
|
|
|
|
call unregister()
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
:::php
|
|
|
|
DocumentationService::unregister($module, $version = false, $lang = false)
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
Unregister a module. You can specify the module, the version and the lang. If
|
|
|
|
no version is specified then all folders of that lang are removed. If you do
|
|
|
|
not specify a version or lang the whole module will be removed from the
|
|
|
|
documentation.
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
|
|
|
|
## Hiding files from listing
|
|
|
|
|
|
|
|
If you want to ignore (hide) certain file types from being included in the
|
|
|
|
listings. By default this is the list of hidden files
|
|
|
|
|
|
|
|
:::php
|
|
|
|
$files = array(
|
|
|
|
'.', '..', '.DS_Store', '.svn', '.git', 'assets', 'themes', '_images'
|
|
|
|
);
|
2010-06-24 16:22:41 +02:00
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
DocumentationService::set_ignored_files($files);
|
2010-10-22 04:09:15 +02:00
|
|
|
|
|
|
|
## Permalinks
|
|
|
|
|
2011-07-04 06:58:15 +02:00
|
|
|
Permalinks can be setup to make nicer urls or to help redirect older urls
|
|
|
|
to new structures.
|
2010-10-22 04:09:15 +02:00
|
|
|
|
|
|
|
DocumentationPermalinks::add(array(
|
2011-07-04 06:58:15 +02:00
|
|
|
'debugging' => 'sapphire/en/topics/debugging',
|
|
|
|
'templates' => 'sapphire/en/topics/templates'
|
2010-10-22 04:09:15 +02:00
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|