API Documentation

There’s been quite a bit of complaining regarding the documentation. It certainly is outdated especially with the Kohana 2.2 release coming up. Anyway, I hear an effort is coming to improve it, so it’ll be better. Keep in mind that you can join in on improving the documentation since it’s a wiki.

As the title suggests this post will cover API documentation. Some of you may know the excellent Kodoc module. Using PHP’s reflection API it is a module to generate API documentation out of your code. If you have properly commented code you’ll see it reflected in the generated documentation. Enabling kodoc is done by enabling the module in application/config.php $config['modules'] array. Uncomment the ‘kodoc’ line. Now you can visit example.com/kodoc to see the documentation.

To help in improving Kohana documentation I took it upon myself to make the API documentation available on the net. The latest release 2.1.3 is available here. These are all static files and won’t be updated (wget ftw). The plan is to host all releases onwards like this.

The latest trunk is available here. I intend to update that regularly especially given the big changes in the API of late. If it’s not updated for a while just bug me about it and I’ll give subversion a kick :)

If there’s a demand for it and the module is properly documented I’ll enable it.

I also updated the looks a little and use the new jQuery UI library for the accordion effect. I hope this will help you all with Kohana.


4 Responses to “API Documentation”

  1. RastaTech Says:

    awesome dlib thanks!
    I really appreciate you putting the kodoc generated docu up on the net.
    When i generate one locally, it creates a page of links that extends below the bottom of the window, yet it doesn’t give me a vertical scroll bar!
    Am I missing something? Is there some config setting somewhere I need to change?
    Anyway, like I said, i’m glad you put it up on the net, that’s way better anyway…

  2. dlib Says:

    The menu is fixed (with css that is) in the local version that causes that behaviour. Change the css in views/kodoc/template.php

    Benefit of having API local is that if you document your code it will show up in the API docs

  3. RastaTech Says:

    Thanks dlib! For anyone having the same issue, the specific trick is to get rid of the ‘fixed’ positioning in #menu….

  4. Adam . Says:

    Hallo,

    at first, thank you for your work.

    I have fixed the static menu, but still have some difficulties with displaying documentation. There isn’t any expanding categories and the documentation is always under the menu.

    Is possible to show your template and files needed for this display? Or maybe insert them to the repository.

    Thanks a lot,

    A

Leave a Comment