Skip to content


Subversion checkout URL

You can clone with
Download ZIP
DocKit - a PHP Documentation framework.
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


DocKit - a PHP Documentation framework.


DocKit is a framework to create an object structure from your code, and generate API documentation for namespaces, interfaces, classes and functions inside your project. It will create an object tree for your project and generate documentation from it.

Currently there is only one sample HTML5 output. If you want to generate PDF or DocBook based formats, you can easily create your own output format. Documentation about this task will be added soon. For now you can take a look at the Templates/Default folder to see how it is done.

It is not a replacement (and most likely never will be) for phpDocumentor. DocKit only is for generating automated API documentation. Nothing else. If you want to include user guides (e.g. cron-task description) or anything else which is not in direct relation to your code, this project is not the right one for you.

Security Notice

DocKit uses the reflection functions of PHP to generate the object structure. This has the side-effect that code, which might be inside your class definitions, is executed. For my projects I separate class definitions from code that is executed, so this works for me. If you don't have a separate location for your classes, please don't use DocKit.


As this release is not intended for a production use there is no official install. You can download the sourcecode through github and play with it.

One this software has reached an at least beta state, I'll provide a pear channel from which you can install DocKit easily.

How to use it

The features are currently very limited. It will just generate the default layout for a given directory. Use the dockit executable to archive this task:

To generate the documentation for dockit into the Documentation/API directory you would use something like:

./dockit Classes/ Documentation/API

I'll work in improving this process, and making it more flexible, in the future.

Known Issues

  • Documentation is missing
  • Global constants are not supported for now
  • Each file inside the project is required (and executed). If you don't like this don't use this project.

Whats next?

Documentation of the Code. It's like in the saying that shoemaker have the worst shoes. My first goal was to release some useable project which is able to generate documentation. As the API for now changes a lot, there is no documentation. I will add it as soon as the code settled a bit.

Better command-line support. The idea is to have more options from the command-line. There are some options planned, but for now I'll just work as described above.

Someday I might extend DocKit with support to the tokenizer. This would have the benefit of not requiring each file or a project, which has the disadvantage that possible code is executed. As mentioned before, this project is a solution for my demands. You might have different ones, or you might want to generate documentation for older projects. For now I strongly advise against using DocKit with projects that execute code inside the class definitions.

Something went wrong with that request. Please try again.