1. Go to this page and download the library: Download byteferry/rql-parser library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
byteferry / rql-parser example snippets
$ composer requrire byteferry/rql-Parser
use ByteFerry/RqlParser/Parser;
$rql_string = 'any(User,columns(id,name,age,gender,address),filter(eq(age,19)))';
try{
$query = Parser::parse( $rql_string);
}catch(\Exception $e){
// will catch errror of parse or grammer checking.
}
use ByteFerry/RqlParser/Parser;
$rql_string = 'filter(eq(age,19))';
try{
$query = Parser::parse( $rql_string, true);
}catch(\Exception $e){
// will catch errror of parse or grammer checking.
}