One suggestion that I got was to use phpDocumentor. Apparently it's able to do the code part of it and it has functionality for creating the narrative side of it. I was also told it integrates with wikis so a combination of both seams like a good method.

Here is the site to get phpDocumentor: http://www.phpdoc.org/