Download the PHP package xianrenqh/api-doc-php without Composer

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

Api-Doc-PHP

说明:

此代码拷贝于IT小强的源码,开源git地址:https://github.com/itxq/api-doc-php

修改部分代码,并增加tp使用注释。 如喜欢原版请使用IT小强的git

版本更新:

1.4.3 修复注释间多个空格bug  
1.4.1 调整json代码块颜色
1.4.0 新增输出返回json数据 
1.3.0 新增header参数 
1.2.0 优化原版本 

主要功能:

演示地址

【Gitee Pages:】http://itxq.gitee.io/api-doc-php

开源地址:

【GigHub:】https://github.com/xianrenqh/api-doc-php

扩展安装:

引用扩展:

使用扩展:

thinkphp5.1使用方法:

1、在控制器下面可以创建例如: application/index/controller/Doc.php

文档代码为:

访问:http://localhost/index/doc即可访问到文档

注意:Api.php控制器的方法里一定要有title,method等参数说明用来给文档提示说明文字,如果无,会报错

2、Api.php案例代码:

namespace app\index\controller;

use think\App;
use think\Controller;
use think\Db;

/**
 * @title API接口
 * @desc API接口
 * Class APi
 * @package app\index\controller
 */
class Api extends Controller
{
    /**
     * @title 获取所有栏目
     * @url /index/api/homecategory
     * @method POST
     * @header string MX-device-type 设备类型 空 必须
     * @code 200 成功
     * @code 201 失败
     * @json {"code":200,"msg":"登录成功","data":{"token":"47b536ddbfccc0a777434a48e5a33a63","shop_id":10001,"admin_type":1,"user":{"id":2,"name":"A002"}}}
     * @return int status 状态码 (具体参见状态码说明)
     * @return string msg 提示信息
     */
    public function homecategory()
    {
        //... 你的代码
    }
}

具体效果可运行test目录下的index.php查看


All versions of api-doc-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.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 xianrenqh/api-doc-php contains the following files

Loading the files please wait ....