|
@@ 1625-1634 (lines=10) @@
|
| 1622 |
|
* @param array $methods |
| 1623 |
|
* @return \Doctrine\ORM\Query\Expr\Andx |
| 1624 |
|
*/ |
| 1625 |
|
protected function createConditionsForIntegerSubquery($subquery, $query, $alias, $currentUser, $methods) |
| 1626 |
|
{ |
| 1627 |
|
if (UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, |
| 1628 |
|
['false', 'true', 'gt', 'gte', 'lt', 'lte', 'eq', 'any', 'null']) |
| 1629 |
|
) { |
| 1630 |
|
throw new InvalidArgumentException('Invalid expression methods used'); |
| 1631 |
|
} |
| 1632 |
|
|
| 1633 |
|
return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods); |
| 1634 |
|
} |
| 1635 |
|
|
| 1636 |
|
/** |
| 1637 |
|
* @param \Doctrine\ORM\QueryBuilder $query |
|
@@ 1705-1714 (lines=10) @@
|
| 1702 |
|
* @param array $methods |
| 1703 |
|
* @return \Doctrine\ORM\Query\Expr\Andx |
| 1704 |
|
*/ |
| 1705 |
|
protected function createConditionsForIntegerColumn($col, $query, $alias, $currentUser, $methods) |
| 1706 |
|
{ |
| 1707 |
|
if (UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, |
| 1708 |
|
['is', 'not', 'gt', 'gte', 'lt', 'lte', 'false', 'true']) |
| 1709 |
|
) { |
| 1710 |
|
throw new InvalidArgumentException('Invalid expression methods used'); |
| 1711 |
|
} |
| 1712 |
|
|
| 1713 |
|
return $this->createExpression('integer', $col, $query, $alias, $currentUser, $methods); |
| 1714 |
|
} |
| 1715 |
|
|
| 1716 |
|
/** |
| 1717 |
|
* Todo: Whitelisting allowed subqueries for the any filter makes having this extra function unnecessary |
|
@@ 1730-1739 (lines=10) @@
|
| 1727 |
|
* @param array $methods |
| 1728 |
|
* @return \Doctrine\ORM\Query\Expr\Andx |
| 1729 |
|
*/ |
| 1730 |
|
protected function createConditionsForIntegerColumnInternal($col, $query, $alias, $currentUser, $methods) |
| 1731 |
|
{ |
| 1732 |
|
if (UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, |
| 1733 |
|
['is', 'not', 'gt', 'gte', 'lt', 'lte', 'false', 'true', 'any']) |
| 1734 |
|
) { |
| 1735 |
|
throw new InvalidArgumentException('Invalid expression methods used'); |
| 1736 |
|
} |
| 1737 |
|
|
| 1738 |
|
return $this->createExpression('integer', $col, $query, $alias, $currentUser, $methods); |
| 1739 |
|
} |
| 1740 |
|
|
| 1741 |
|
/** |
| 1742 |
|
* Knows how to create a callable from a subquery definition |