Book Image

Learning Phalcon PHP

Book Image

Learning Phalcon PHP

Overview of this book

Table of Contents (17 chapters)
Learning Phalcon PHP
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Documenting the API


Documentation is probably one of the most important things you should spend time on. When I discovered Phalcon, the first thing that I did was to develop a simple API. When I needed to create documentation for my API, I found myself in a strange situation; there were just a few solutions out there, and most of them had dependencies. This was back in the summer of 2013 or so.

So, I decided to create my own API documentation generator, without any dependencies—just pure PHP. I am going to use this tool (it is publicly available on GitHub at https://github.com/calinrada/php-apidoc) to create and generate the API documentation for our project.

Installation

You should already have it, because I was using the extractor from it to generate comments for the CLI tasks. If you missed it, you can do it in two easy steps:

$ php composer.phar require crada/php-apidoc
$ php composer.phar update

Usage

We'll perform a couple of steps to properly understand the usage:

  1. Let's create a new CLI...