Download the PHP package widuu/think-api without Composer

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

think-api

Thinkphp 6 api 文档生成系统

安装

配置

使用

生成静态文档,使用 php think api 参数如下

实时访问通过配置中定义的路由就可以直接访问了

注释说明

类注解

名称 说明 实例
@ApiTitle 类说明,如果不存在分组(@ApiSector)标题当成分组 @ApiTitle("测试类")
@ApiSector 分组,如果类内部方法没有此注解,所有函数都归属于此分组 @ApiSector("测试分组")
@ApiInternal 内部文档,禁止解析,使用之后此类不会被解析 @ApiInternal(true)
@ApiWeigh 排序,数字越大,排序越靠上 @ApiWeigh(10)

方法注解

注只解析 public 方法,并且跳过 __construct 方法,如果想要跳过哪些方法,可以在 config/api.php 中的 api_method_fileter 中添加方法名称来跳过注解

名称 说明 实例
@ApiInternal 内部文档,禁止解析,使用之后此方法不会被解析 @ApiInternal (true)
@ApiTitle 方法说明,如果不存在,会匹配注释的文档信息匹配中文和英文信息,不能有符号,匹配不成功就是英文名称 @ApiTitle("测试方法")
@ApiSector 分组,如果不存在分组,则属于类内部分组 @ApiSector ("测试分组")
@ApiRoute 路由,如果是指定的tinkphp的控制器,可以为空自动解析,但是如果其他类或者伪静态一定要指定,路由建议用""注释,防止解析{}符号 @ApiRoute ("/index/test/{name}")
@ApiMethod Api的请求方法,如果不存在就是 'GET' 方法 @ApiMethod(POST)
@ApiContentType Api 的 Content-type @ApiMethod ("multipart/form-data")
@ApiHeaders 请求头部信息,可以多个 @ApiHeaders (name=username, type=string, required=true, description="请求的用户名")
@ApiParams 请求的参数,可以多个 @ApiParams(name="name", type="string", required=true, description="方法名字")
@ApiReturnParams 返回参数说明,可以多个 @ApiReturnParams (name="code", type="integer", required=true, sample="0", description="返回的状态")
@ApiReturnHeaders 返回头部,可以多个 @ApiReturnHeaders (name="token", type="integer", required=true, sample="xxxxxxxx")
@ApiReturn 返回结果示例,json中使用"",因为会解析{} @ApiReturn ("{'code':1,'msg':'返回成功','data':{'test':1}}")
@ApiBody body正文 @ApiBody ("body")
@ApiWeigh 排序,数字越大,排序越靠上 @ApiWeigh(10)

示例


All versions of think-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
topthink/framework Version ^6.0.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 widuu/think-api contains the following files

Loading the files please wait ....