To parse thrift file to struct,support const、enum、exception、include、namespace、service、struct、typedef and union
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();
[
'namespace' => [
'php' => [
'serviceName'=>'SMS'
]
]
]