解析符合PSR4标准的源码,并生成对应rst文档格式

属性
命名空间 fize\doc\handler
类名 ReStructuredText
父类 fize\doc\DocHandler
方法:
方法名 说明
parse() 解析
file() 解析代码文件
dir() 解析代码文件夹
__construct() 初始化

方法

parse()

解析

public function parse () : string
返回值:返回RST格式文档字符串

file()

解析代码文件

public static function file (
    string $file,
    string $output,
    string $namespace = "",
    array $filters = []
)
参数:
名称 说明
file 文件路径
output 导出的文档路径
namespace 命名空间
filters 过滤器

dir()

解析代码文件夹

public static function dir (
    string $dir,
    string $output,
    string $namespace = "",
    array $map = [],
    array $filters = []
)
参数:
名称 说明
dir 文件夹路径
output 导出的文档目录路径
namespace 命名空间
map 文件夹命名规范
filters 过滤器

__construct()

初始化

public function __construct (
    string $class,
    array $filters = []
)
参数:
名称 说明
class 类全限定名
filters 过滤器