Download the PHP package junguo/yii2-apidoc without Composer

On this page you can find all versions of the php package junguo/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

项目描述

1、增加redis,加快解析速度
2、自定义域名,文档,api分开
3、自定义app路径,
4、增加令牌,方便测试,过期再生成,自动保存
5、极简参数
6、开放权限下降class,method.mould无需标注
7、继承类的方法需要显式标注才显示
8、删除bootstrap,不再因加载困扰

安装

composer require junguo/yii2-apidoc

访问

直接访问项目地址根目录即可。登录默认密码:123456

准备

1、请确保yii2开启了url美化功能,

2、需要安装好redis

项目配置:

将下方配置引入入口文件main-local.php或按照项目配置文件( 正式环境不要引入):

['modules']['apidoc']配置说明:

注释参数 作用 备注
class 模块入口
password 登录模块的密码
ipFilters IP登录限制
apppath api模块路径
ctrs api下根controllers,可多个
tokenname 测试时使用.
domain 实际api的请求域名 不是同一域名下要注意跨域问题 在API的index.php文件添加 header('access-Control-Allow-Origin:*');
token_type 令牌上传方式,默认1 , 2 post参数形式 3 header Bearer 1 明文url参数追加

Phpstrom 注释配置:

打开phpstrom->setting->Editor->File and Code Templates->Includes,将两个文件内容替换原本的文件内容,点击apply即可

配置文件:

PHP Function Doc Comment

PHP Class Doc Comment

检查phpstorm配置

使用apidoc编写程序注释

1、方法注释规范如下:

注释参数 作用 备注
brief 标明方法名称,将会显示在页面左方
param 需要传入的参数
method 调用方法,POST/GET
return 返回参数,将会显示在页面右方
throws 异常声明,将会显示在页面右方
detail 接口说明,将会显示在页面右方
api-disable 接口说明,默认显示,如显式增加为隐藏class或者method
ext-enable 接口说明,默认隐藏继承类的method,如无显式标注不显示, 多个method逗号分隔,无需加action

示例:

先配置好phpstome注释配置。 1、配置controller类的注释 2、配置action的注释


All versions of yii2-apidoc with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
yiisoft/yii2-redis Version *
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 junguo/yii2-apidoc contains the following files

Loading the files please wait ....