/** * Handles a newly parsed operand, the operand will be appended to the * current operator if there is one, if not it becomes the current item. * The element which should be the current item is returned by this function. * * @param ezcTemplateTstNode $currentOperator The current operator/operand element, can be null. * @param ezcTemplateTstNode $operand The parsed operator/operand which should be added as parameter. * @return ezcTemplateTstNode */ public function handleOperand($currentOperator, ezcTemplateTstNode $operand) { if ($currentOperator !== null) { $currentOperator->appendParameter($operand); return $currentOperator; } else { return $operand; } }