Giter VIP home page Giter VIP logo

apigen's Introduction

Smart and Readable Documentation for your PHP project

Build Status Coverage Status Downloads Latest stable

ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is all PHP 7.1 features ready easy to extend with own Finder, Annotation Subscriber or even Generator.

Just look at ApiGen API:

ApiGen Preview

Your Help is Needed to Finish 5.x Release

โค๏ธ We need your help to test new version of ApiGen.

How to install it?

Add to your composer.json:

{
    "require": {
        "apigen/apigen": "dev-master",
        "roave/better-reflection": "dev-master#c87d856"
    }
}

then update:

composer update

Test it, report issues or send PRs.

๐Ÿ’€ Version 4.x is not supported, since there was huge change of Reflection library and the code was almost completely rewritten.

Built on Shoulders of Giants

Install

composer require apigen/apigen --dev

Usage

Generate API docs by passing single source and destination options:

vendor/bin/apigen generate src --destination docs

Or generate API docs for multiple directories:

vendor/bin/apigen generate src tests --destination docs

Configuration

Below is a minimal example configuration. Save it as a apigen.yml file in the root of your project:

parameters:
    visibility_levels: [public, protected] # array
    annotation_groups: [todo, deprecated] # array
    title: "ApiGen Docs" # string
    base_url: "http://apigen.org/api" # string
    overwrite: false # bool

What Annotations Have Extra Care?

@see, @covers, @uses

Reference to Class, Function, Property, Method etc. element.

In Code

/**
 * @see SomeClass
 * @see SomeClass::$propety
 * @see SomeClass::someFunction()
 */

Generated

@see <a href="class-SomeClass.html">SomeClass</a>
@see <a href="class-SomeClass.html#$someProperty">SomeClass::$property</a>
@see <a href="class-SomeClass.html#_someFunction">SomeClass::someFunction()</a>

@link

A website url.

In Code

/**
 * This is already mentioned on Wiki.
 * @link https://en.wikipedia.org/wiki/United_we_stand,_divided_we_fall Click to see a cool quote
 */

Generated

This is already mentioned on Wiki.
@link <a href="https://en.wikipedia.org/wiki/United_we_stand,_divided_we_fall">Click to see a cool quote</a>

@internal

Associated element is internal, so ApiGen hides it.

Themes

To enable a custom theme just provide theme_directory configuration option in your apigen.yml:

parameters:
    theme_directory: path/to/theme # path to theme's config file

Contributing

Rules are simple:

  • new feature needs tests
  • all tests must pass
    composer complete-check
  • 1 feature per PR

We would be happy to merge your feature then.

apigen's People

Contributors

tomasvotruba avatar kukulich avatar andrewsville avatar ek9 avatar jadb avatar vlastavesely avatar dg avatar jankal avatar popsul avatar milo avatar fltr avatar nelson6e65 avatar phillaf avatar pfefferle avatar grogy avatar yoosefi avatar olvlvl avatar majkl578 avatar markstory avatar jrnickell avatar pierredup avatar zemistr avatar smasty avatar mikulas avatar miclf avatar malkusch avatar marcovtwout avatar admad avatar mavimo avatar finwe avatar

Watchers

James Cloos 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.