2017 © Pedro PelĂĄez
 

library thrift-parser-php

parse thrift file by php

image

zorrow/thrift-parser-php

parse thrift file by php

  • Wednesday, September 20, 2017
  • by wangwenbo
  • Repository
  • 1 Watchers
  • 1 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

thrift-parser-php

To parse thrift file to struct,support const、enum、exception、include、namespace、service、struct、typedef and union, (*1)

Example

ParserCal,ParserFunc are baisc functions., (*2)

initSubject function (Class ThriftParser) is to set the sets which will be dealed., (*3)


$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

https://github.com/eleme/thrift-parser, (*4)

The Versions

20/09 2017

dev-master

9999999-dev

parse thrift file by php

  Sources   Download

MIT

The Development Requires

by zorrow

20/09 2017

v0.0.2

0.0.2.0

parse thrift file by php

  Sources   Download

MIT

The Development Requires

by zorrow

31/07 2017

v0.0.1

0.0.1.0

parse thrift file by php

  Sources   Download

MIT

The Development Requires

by zorrow