PHP Class phprs\apis\ApiExporter

Author: caoym
Show file Open project: caoym/phprs-restful

Public Methods

Method Description
exportApiHtml ( $class_name ) : ({"header", 导出API信息 简陋的html形式
exportJson ( $class = null ) 导出API信息
exportMainHtml ( ) : ({"header", 导出API信息 简陋的html形式
getInvokerInfo ( $method, $uri, Invoker $invoker ) : array 获取invoker信息
walkTree ( unknown &$arr, $visitor ) 遍历数组, 子数组

Private Methods

Method Description
createExceptionDoc ( array $api ) : array 生成响应的示例和说明
createRequestDoc ( array $api ) : array 生成请求的示例和说明
createResponseDoc ( array $api, $default_return = true ) : array 生成响应的示例和说明
getDocText ( string $doc ) : string 去掉文档中的@标记和*号等, 保留可读文本
getResponseInfo ( $return ) : array 获取单个响应的示例和说明
searchArgInfo ( $value )

Method Details

exportApiHtml() public method

导出API信息 简陋的html形式
public exportApiHtml ( $class_name ) : ({"header",
return ({"header",

exportJson() public method

导出API信息
public exportJson ( $class = null )

exportMainHtml() public method

导出API信息 简陋的html形式
public exportMainHtml ( ) : ({"header",
return ({"header",

getInvokerInfo() public method

获取invoker信息
public getInvokerInfo ( $method, $uri, Invoker $invoker ) : array
$method http方法
$uri http url
$invoker phprs\Invoker
return array

walkTree() static public method

遍历数组, 子数组
static public walkTree ( unknown &$arr, $visitor )
$arr unknown