Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Latest commit

 

History

History
78 lines (53 loc) · 1.41 KB

README.md

File metadata and controls

78 lines (53 loc) · 1.41 KB

EnixApp - Apidoc

Serve your PHP files in local and see the documentation.

Currently (only) support markdown.

Installation

Download or clone this project and place them outside or separate from your main project directory for the first time.

sample/
┖─ apidoc/
   ┖─ build/
   ┖─ markdown/
      ┖─ document.md
      ┖─ index.md
   ┖─ config.json
┖─ your-directory-contains-php-files/
┖─ apidoc.phar

Install Chrome Extension

Recomended for you to install Chrome extensions in your favorite web browser (based on chromium):

  1. Markdown Viewer
  2. JSON Viewer

Config File

See: ./apidoc/config.json

Example:

{
	"directory": "your-directory-contains-php-files",
	"exclude": [
		"bin"
	],
	"hideModifiers": {
		"constant": ["private", "protected"],
		"property": ["private", "protected"],
		"method": ["private", "protected"]
	},
	"hideElements": ["source", "params"]
}

Command Line Usage

Serve files in local server:

$ php apidoc.phar serve

Generate documentation (markdown files):

$ php apidoc.phar build

Templating (Markdown)

Require files:

  1. index.md
  2. document.md

You can modify them with your own style. Support Twig-PHP syntax.

Generated Documents

See directory ./apidoc/build/api/