Download the PHP package yiisoft/yii2-apidoc without Composer

On this page you can find all versions of the php package yiisoft/yii2-apidoc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-apidoc

API documentation generator for Yii 2


This extension provides an API documentation generator for the Yii framework 2.0.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads Build Status

Installation

The preferred way to install this extension is through composer.

Either run

The above command may not work on an existing project due to version conflicts that need to be resolved, so it is preferred to add the package manually to the require section of your composer.json:

afterwards run composer update. You may also run composer update yiisoft/yii2-apidoc cebe/markdown if you want to avoid updating unrelated packages.

Usage

This extension creates executable at /vendor/bin. Please do change directory to that directory if you do not want to use full path i.e /vendor/bin/apidoc and use just the executable name as with below examples.

This extension offers two commands:

1)api to generate class API documentation. phpDocumentor is used as a base framework so refer to its guide for the syntax.

The output of help api command (i.e apidoc help api):

2)guide to render nice HTML pages from markdown files such as the yii guide.

The output of help guide command (i.e apidoc help guide):

Simple usage for stand-alone class documentation:

vendor/bin/apidoc api source/directory ./output

Simple usage for stand-alone guide documentation:

vendor/bin/apidoc guide source/docs ./output

Note that in order to generate a proper index file, the README.md file containing links to guide sections must be present. An example of such file can be found in the yii2 repository.

You can combine them to generate class API and guide documentation in one place:

# generate API docs
vendor/bin/apidoc api source/directory ./output
# generate the guide (order is important to allow the guide to link to the apidoc)
vendor/bin/apidoc guide source/docs ./output

By default, the bootstrap template will be used. You can choose a different template with the --template=name parameter. Currently, there is only the bootstrap template available.

You may also add the yii\apidoc\commands\ApiController and GuideController to your console application command map and run them inside your application's console app.

Generating docs from multiple sources

The apidoc generator can use multiple directories, so you can generate docs for your application and include the yii framework docs to enable links between your classes and framework classes. This also allows @inheritdoc to work for your classes that extend from the framework. Use the following command to generate combined api docs:

./vendor/bin/apidoc api ./vendor/yiisoft/yii2,. docs/json --exclude="docs,vendor"

This will read the source files from ./vendor/yiisoft/yii2 directory and . which is the current directory (you may replace this with the location of your code if it is not in the current working directory).

Advanced usage

The following script can be used to generate API documentation and guide in different directories and also multiple guides in different languages (like it is done on yiiframework.com):

Creating a PDF of the guide

Prerequisites:

Generation:

If all runs without errors the PDF will be guide.pdf in the output dir.

Special Markdown Syntax

We have a special Syntax for linking to a class in the API documentation. See the code style guide for details.

Creating your own templates

TBD

Using the model layer

TBD


All versions of yii2-apidoc with dependencies

PHP Build Version
Package Version
Requires ext-dom Version *
ext-mbstring Version *
php Version ^7.2 || ^8.0
yiisoft/yii2 Version ~2.0.16
yiisoft/yii2-bootstrap Version ~2.0.0
phpdocumentor/reflection Version ^5.1.0
nikic/php-parser Version ^4.0
cebe/js-search Version ~0.9.0
cebe/markdown Version ^1.0
cebe/markdown-latex Version ^1.0
scrivo/highlight.php Version ^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yiisoft/yii2-apidoc contains the following files

Loading the files please wait ....