mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Add phpDocumentator to project
Create configuration to create api doc with cli. refs #4085
This commit is contained in:
parent
5ad4876386
commit
5e39e7ebeb
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,3 +20,6 @@ test/php/bin/extcmd_test
|
|||||||
|
|
||||||
# misc test output
|
# misc test output
|
||||||
test/frontend/static/public
|
test/frontend/static/public
|
||||||
|
|
||||||
|
# Generated API documentation
|
||||||
|
doc/api
|
||||||
|
24
doc/apidoc_creation.md
Normal file
24
doc/apidoc_creation.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Create API documentation
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
You need phpDocumentor 2 installed on your system to create the api
|
||||||
|
documentation. Please visit [phpdoc's website](http://phpdoc.org/) for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
phpDocumentator is configured with xml configuration reside in doc/phpdoc.xml.
|
||||||
|
In there you'll find the target path where the documentation is created as
|
||||||
|
html. Default location is doc/api/. Just point to index.html in this directory
|
||||||
|
with a browser.
|
||||||
|
|
||||||
|
If you generated the documentation already, you can follow [this link](apidoc/idnex.html).
|
||||||
|
|
||||||
|
## Generation
|
||||||
|
|
||||||
|
Change to Icinga 2 Web root directory (source tree) and run:
|
||||||
|
|
||||||
|
```
|
||||||
|
phpdoc -c doc/phpdoc.xml
|
||||||
|
```
|
22
doc/phpdoc.xml
Normal file
22
doc/phpdoc.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<phpdoc>
|
||||||
|
<title>Icinga 2 Web</title>
|
||||||
|
<parser>
|
||||||
|
<target>./api</target>
|
||||||
|
<extension>php</extension>
|
||||||
|
</parser>
|
||||||
|
<visibility>public,private,protected</visibility>
|
||||||
|
<transformer>
|
||||||
|
<target>./api</target>
|
||||||
|
</transformer>
|
||||||
|
<logging>
|
||||||
|
<level>quiet</level>
|
||||||
|
</logging>
|
||||||
|
<transformations>
|
||||||
|
<template name="responsive" />
|
||||||
|
</transformations>
|
||||||
|
<files>
|
||||||
|
<directory>../library/Icinga</directory>
|
||||||
|
<directory>../library/application</directory>
|
||||||
|
</files>
|
||||||
|
</phpdoc>
|
Loading…
x
Reference in New Issue
Block a user