Download the PHP package byteferry/rql-parser without Composer
On this page you can find all versions of the php package byteferry/rql-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download byteferry/rql-parser
More information about byteferry/rql-parser
Files in byteferry/rql-parser
Package rql-parser
Short Description A PHP parser for parsing the resource query language(RQL) to php data structure
License MIT
Homepage http://byteferry.github.io/rql-parser/
Informations about the package rql-parser
ByteFerry RQL-Parser
ByteFerry RQL-Parser is used for parsing the RQL text to the paramaters with PHP array structure for the calling of php methods.
This library consists of the following parts:
- lexer for tokenization RQL code
- parser for creating abstract syntax tree
- builder using simplized ABNF of RQL
Features
- High performance. The size of source code is less than 60KB.
- It is fully according the compile specification.
- Friendly for development with the checking of RQL grammer.
- Support the both reading and writing query.
- Support
filter
sort
search
andpagination
- Fully tested with phpUnit.
- Zero dependencies.
Why RQL
- For the same data, RQL has much fewer bytes than JSON.
- Simple and easy to learn.
- RQL will make the API interface more flexible
- RQL is more suitable for small and medium-sized projects than GraphQL.
- RQL can save you more development time.
Installation
Usage
- parser a full query
if sucess, it will return a QueryInterface.
- parser a query segment of RQL query
Here is a complex example. (Not a real query, but returns all properties)
We could see that the parser add groupby automatically, and returns the property parematers for validation.
Documentation
Contribution
- Fork the repository
- Create Feat_xxx branch
- Commit your code
- Create Pull Request
Donation
If you find this project useful, you can buy author a glass of juice 🍹
License
MIT
Copyright [2020] ByteFerry [email protected]