Skip to content

Instantly share code, notes, and snippets.

View nash-ye's full-sized avatar
🎯
Focusing

Nashwan Doaqan nash-ye

🎯
Focusing
View GitHub Profile
@nash-ye
nash-ye / criteria-to-query-builder.php
Created May 24, 2016 01:59 — forked from jgornick/criteria-to-query-builder.php
Doctrine: Criteria Array to Doctrine QueryBuilder
<?php
/**
* Recursively takes the specified criteria and adds too the expression.
*
* The criteria is defined in an array notation where each item in the list
* represents a comparison <fieldName, operator, value>. The operator maps to
* comparison methods located in ExpressionBuilder. The key in the array can
* be used to identify grouping of comparisons.
*