Git Product home page Git Product logo

apigen's Introduction

ApiGen - PHP source code API generator

Build Status Downloads this Month Latest stable

ApiGen generates nice looking and user-friendly documentation.

Just look at Doctrine ORM API or Nette API.

Features

Installation

As a PHAR (recommended)

  1. Download apigen.phar via installer:

    $ curl -sS http://apigen.org/installer | php
  2. Create apigen.neon file in your project. This is basic example only with all required items. The file uses Neon syntax.

    source:
        - src
    
    destination: api
  3. Run ApiGen:

    php apigen.phar generate

For global installation, see documentation.

Using Composer globally

Alternatively, you can install ApiGen via composer global .

composer global require apigen/apigen 

Run:

~/.composer/vendor/bin/apigen generate

If you add ~/.composer/vendor/bin to your PATH, you can run bin/apigen generate instead.

Using Composer as dependency of your project

Install package:

composer require apigen/apigen --dev 

Run:

php vendor/bin/apigen generate

Options

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

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

# this files will be included in class tree, but will not create a link to their documentation
# either files
skipDocPath:
    - * <mask>``` # mask

# or with certain name prefix
skipDocPrefix:
    - Nette

# character set of source files; if you use only one across your files, we recommend you name it
charset:
	# default
    - auto # will choose from all supported (starting with UTF-8), slow and not 100% reliable
    # e.g.
    - UTF-8
    - Windows-1252

# 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 own template theme
templateTheme: default # default [other options: bootstrap]

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

# the way elements are grouped in menu
groups: auto # default [other options: namespace, packages, none], auto will detect namespace first, than packages

# element supported by autocomplete in search input
autocomplete:
	# default
	- classes
	- constants
	- functions
	# other
	- methods
	- properties
	- classconstants

# access levels of included method and properties
accessLevels:
	# default
	- public
	- protected
	# other
	- private

# include elements marked as @internal/{@internal}
internal: false # default [true]

# generate documentation for PHP internal classes
php: true # default [false]

# generate tree view of classes, interfaces, traits and exceptions
tree: true # default [false]

# generate documentation for deprecated elements
deprecated: false # default [false]

# generate list of tasks with @todo annotation
todo: false # default [true]

# add link to ZIP archive of documentation
download: false # default [true]

Detailed documentation

Performance

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

apigen's People

Contributors

admad avatar akirk avatar alexhenrie avatar andrewsville avatar dg avatar finwe avatar fltr avatar gharlan avatar grogy avatar kravco avatar kukulich avatar leonex-cs1 avatar lopo avatar majkl578 avatar malkusch avatar marian-r avatar mattskala avatar mavimo avatar miclf avatar milo avatar pfefferle avatar pierredup avatar ravage84 avatar smasty avatar tomaswindsor avatar voda avatar vrana avatar vrtak-cz avatar zemistr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.