Skip to content

chengky/apigen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApiGen - PHP source code API generator

Build Status Quality Score Code Coverage Downloads this Month Latest stable

ApiGen generates nice looking and user-friendly documentation.

Just look at Doctrine ORM API or Nette API.

Features

Installation

1. As a PHAR (recommended)

  1. Download ApiGen RC5

  2. Run ApiGen with source and destination options:

php apigen.phar generate -s src -d ../my-project-api

To omit cli options just create apigen.neon file in your project using Neon syntax.

source:
    - src

destination: ../my-project-api

For global installation, see documentation.

2. Using Composer as dependency of your project

composer require apigen/apigen --dev

Then run with options as above:

php vendor/bin/apigen generate -s src -d ../my/project-api

Options

# list of scanned file extensions (e.g. php5, phpt...)
extensions: [php]

# directories and files matching this file mask will not be parsed
exclude:
	- tests/
	- vendor/
	- *Factory.php

# similar to above, but this files will be included in class tree
skipDocPath:
    - *Component\Console

# character set of source files; if you use only one across your files, we recommend you name it
charset: [UTF-8]

# elements with this name prefix will be considered as the "main project" (the rest will be considered as libraries)
main: ApiGen

# title of generated documentation
title: ApiGen API

# base url used for sitemap (useful for public doc)
baseUrl: http://api.apigen.org

# custom search engine id, will be used by search box
googleCseId: 011549293477758430224

# Google Analytics tracking code
googleAnalytics: UA-35236-5

# choose ApiGen template theme
templateTheme: default # or: bootstrap

# want to use individual templates, higher priority than option templateTheme
templateConfig: my/template/config.neon

# the way elements are grouped in menu
groups: auto # also: namespace, packages, none; auto will detect namespace first, than packages

# access levels of included method and properties
accessLevels: [public, protected] # also [private]

# include elements marked as @internal/{@internal}
internal: false

# generate documentation for PHP internal classes
php: true

# generate highlighted source code for elements
sourceCode: true

# generate tree view of classes, interfaces, traits and exceptions
tree: true

# generate documentation for deprecated elements
deprecated: false

# generate list of tasks with @todo annotation
todo: false

# add link to ZIP archive of documentation
download: false

Detailed documentation

Performance

When generating documentation of large libraries, not loading the Xdebug PHP extension will improve performance.

About

PHP source code API generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 83.0%
  • JavaScript 14.9%
  • CSS 2.1%