mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
💚 Fix unit tests
This commit is contained in:
@@ -47,6 +47,29 @@ abstract class Expression
|
||||
*/
|
||||
abstract public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true);
|
||||
|
||||
public final static function ConvertArrayToOQL($aExpressions, $aArgs)
|
||||
{
|
||||
$aRet = array();
|
||||
foreach ($aExpressions as $sName => $oExpression)
|
||||
{
|
||||
/** @var Expression $oExpression */
|
||||
$aRet[$sName] = $oExpression->RenderExpression(false, $aArgs);
|
||||
}
|
||||
return $aRet;
|
||||
}
|
||||
|
||||
public final static function ConvertArrayFromOQL($aExpressions)
|
||||
{
|
||||
$aRet = array();
|
||||
foreach ($aExpressions as $sName => $sConditionExpr)
|
||||
{
|
||||
/** @var Expression $oExpression */
|
||||
$aRet[$sName] = Expression::FromOQL($sConditionExpr);
|
||||
}
|
||||
return $aRet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* recursive rendering
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user