-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create configuration to create api doc with cli. refs #4085
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,6 @@ test/php/bin/extcmd_test | |
|
||
# misc test output | ||
test/frontend/static/public | ||
|
||
# Generated API documentation | ||
doc/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |