include/Expressions/Expression/Parser/Parser.php
\Parser
Package: SugarCRM
Expression parser
- Api
Methods

evaluate(
string $expr, $context
=
false
)
:
void
static
Evaluates an expression.
Parameters
| Name | Type | Description |
|---|---|---|
| $expr | string | the expression to evaluate |
| $context |

getFieldsFromExpression(
$expr, $fieldDefs
=
false
)
:
array
static
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $expr | ||
| $fieldDefs |
| Type | Description |
|---|---|
| array |
- Static

replaceVariables(
string $expr, \Array/SugarBean $target
)
:
void
static
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $expr | string | |
| $target | \Array/SugarBean |
- Deprecated
- returns the expression with the variables replaced with the values in target.

throwException(
$function, $type, $message
)
:
void
static
Throws a custom exception with a predefined prefix and message.
Parameters
| Name | Type | Description |
|---|---|---|
| $function | ||
| $type | ||
| $message |