openclerk/api-list 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

openclerk/api-list

最新稳定版本:0.1.0

Composer 安装命令:

composer require openclerk/api-list

包简介

A library for listing and discovering runtime properties of APIs

README 文档

README

A library for listing and discovering runtime properties of APIs

Installing

Include openclerk/api-list as a requirement in your project composer.json, and run composer update to install it into your project:

{
  "require": {
    "openclerk/api-list": "dev-master"
  }
}

Using

If you are using something like component-discovery, you can define a new API for listing all runtime discovered APIs using the ApiListApi abstract superclass:

class MyApiListApi extends \Apis\ApiList\ApiListApi {

  function getAPIs() {
    return \DiscoveredComponents\Apis::getAllInstances();
  }

}

You can also get all runtime API information like so:

$lister = new \Apis\ApiList\ApiLister();
$apis = $lister->processAPIs(\DiscoveredComponents\Apis::getAllInstances());

foreach ($apis as $api) {
  print_r(array(
    $api['endpoint'],
    $api['title'],
    $api['description'],
    $api['params'],   // array
    // ...
  ));
}

统计信息

  • 总下载量: 149
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-02-27