Skip to content

Commit

Permalink
Add phpDocumentator to project
Browse files Browse the repository at this point in the history
Create configuration to create api doc with cli.

refs #4085
  • Loading branch information
mxhash authored and Jannis Moßhammer committed Jul 10, 2013
1 parent 5ad4876 commit 5e39e7e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ test/php/bin/extcmd_test

# misc test output
test/frontend/static/public

# Generated API documentation
doc/api
24 changes: 24 additions & 0 deletions doc/apidoc_creation.md
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
```
22 changes: 22 additions & 0 deletions doc/phpdoc.xml
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>

0 comments on commit 5e39e7e

Please sign in to comment.