PHPackages                             endeavourplatforms/qbjs-parser-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. endeavourplatforms/qbjs-parser-bundle

ActiveLibrary[Database &amp; ORM](/categories/database)

endeavourplatforms/qbjs-parser-bundle
=====================================

This bundle is a Symfony wrapper for endeavourplatforms/qbjs-parser.

1.0.3(3y ago)0857MITPHPPHP ^7.0|^8.0

Since Apr 5Pushed 3y agoCompare

[ Source](https://github.com/EndeavourPlatforms/QBJSParserBundle)[ Packagist](https://packagist.org/packages/endeavourplatforms/qbjs-parser-bundle)[ Docs](https://github.com/EndeavourPlatforms/QBJSParserBundle)[ RSS](/packages/endeavourplatforms-qbjs-parser-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (5)Used By (0)

QBJSParserBundle
================

[](#qbjsparserbundle)

[![StyleCI](https://camo.githubusercontent.com/44dbd66201fe6d0e298b481eff667ea64ffad57f2fe262cf7daf86db9d983b56/68747470733a2f2f7374796c6563692e696f2f7265706f732f36383931343739342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/68914794)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/fourlabsldn/QBJSParserBundle/master/LICENSE)

This is a Symfony bundle, which can be used with [jQuery QueryBuilder](http://querybuilder.js.org/).

- It will **parse JSON coming from the frontend, and let you execute it as a Doctrine ORM query**.
- It will **give you JSON to generate the frontend**, based on your Doctrine ORM entities and configuration.
- It is based on [QBJSParser](https://github.com/fourlabsldn/QBJSParser), which can be used without Symfony.

It has two useful services:

- `fl_qbjs_parser.json_query_parser.doctrine_orm_parser` based on class `FL\QBJSParserBundle\Service\JsonQueryParser\DoctrineORMParser`
    - This will parse a `$jsonString` coming from JQuery QueryBuilder, and a `$className`, into a `FL\QBJSParser\Parsed\Doctrine\ParsedRuleGroup`.
    - The `ParsedRuleGroup` has two properties, `$dqlString` and `$parameters`, accessible via getters.
    - Use the `ParsedRuleGroup` properties, to create a Doctrine Query.
    - This service is to be used with DoctrineORM.
    - This service implements `JsonQueryParserInterface`. More parsers could exist for other ORMs / ODMs.
- `fl_qbjs_parser.builders` based on class `FL\QBJSParserBundle\Service\JavascriptBuilders`
    - Use the service's `getBuilders()`, to fetch an array of `FL\QBJSParserBundle\Model\Builder\Builder` instances.
    - Each `Builder` comes with five properties, accessible via getters, `$className`, `$jsonString`, `$humanReadableName`, `$builderId`, and `$resultColumns`.
    - Use the properties of a `Builder`, to instantiate a JQuery Query Builder in your front-end.

### Installation

[](#installation)

- `composer require fourlabs/qbjs-parser-bundle`
- Add the Bundle to app/AppKernel.php

```
