function units_mathematical_expression_operator_construct in Units of Measurement 7.2
Construct operator object.
Parameters
array $operator: Definition of cTools "operator" plugin whose object should be constructed
\UnitsMathematicalExpression $operand1: Operand #1
\UnitsMathematicalExpression $operand2: Operand #2
Return value
\UnitsMathematicalOperatorInterface Object that represents provided input arguments
7 calls to units_mathematical_expression_operator_construct()
- AbstractUnitsMathematicalOperator::decompose in ./
units.module - Decompose (simplify) this mathematical expression.
- units_mathematical_expression_create_from_postfix in ./
units.module - Create mathematical expression object from postfix (reverse polish) notation.
- units_mathematical_expression_load in ./
units.module - Load mathematical expression from database.
- units_operator_add_isolate_operand in plugins/
operator/ add.inc - units_operator_divide_isolate_operand in plugins/
operator/ divide.inc
File
- ./
units.module, line 1114 - Provide API for managing and converting units of measurement.
Code
function units_mathematical_expression_operator_construct(array $operator, UnitsMathematicalExpression $operand1, UnitsMathematicalExpression $operand2) {
$class = $operator['operator class'];
return new $class($operator, $operand1, $operand2);
}