zorrow/thrift-parser-php
Composer 安装命令:
composer require zorrow/thrift-parser-php
包简介
parse thrift file by php
README 文档
README
To parse thrift file to struct,support const、enum、exception、include、namespace、service、struct、typedef and union
Example
ParserCal,ParserFunc are baisc functions.
initSubject function (Class ThriftParser) is to set the sets which will be dealed.
$path = "./namespace.thrift"; $parserCal = new ParserCal($path); $parserFunc = new ParserFunc($parserCal); $parser = new ThriftParser($parserFunc); $thriftNamespace = new ThriftNamespace($parserFunc); $parser->initSubject($thriftNamespace); $file = $parser->readThrift();
Return
[
'namespace' => [
'php' => [
'serviceName'=>'SMS'
]
]
]
Reference
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-31