public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelyMultipleOrOrdered() === false) {
            $msg = "The StatsOperator operator only accepts operands with a multiple or ordered cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyNumeric() === false) {
            $msg = "The StatsOperator operator only accepts operands with a multiple or ordered cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $qtiFuncName = Statistics::getNameByConstant($this->getExpression()->getName());
        $methodName = 'process' . ucfirst($qtiFuncName);

        return call_user_func_array(array($this, $methodName), array());
    }
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelyMultipleOrOrdered() === false) {
            $msg = "The StatsOperator operator only accepts operands with a multiple or ordered cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyNumeric() === false) {
            $msg = "The StatsOperator operator only accepts operands with a multiple or ordered cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $qtiFuncName = Statistics::getNameByConstant($this->getExpression()->getName());
        $methodName = 'process' . ucfirst($qtiFuncName);

        return call_user_func_array(array($this, $methodName), array());
    }
public function process ( ) { $ operands = $ this -> getOperands ( ) ; if ( $ operands -> containsNull ( ) === true ) { return null ; } if ( $ operands -> exclusivelyMultipleOrOrdered ( ) === false ) { $ msg = "The StatsOperator operator only accepts operands with a multiple or ordered cardinality." ; throw new OperatorProcessingException ( $ msg , $ this , OperatorProcessingException :: WRONG_CARDINALITY ) ; } if ( $ operands -> exclusivelyNumeric ( ) === false ) { $ msg = "The StatsOperator operator only accepts operands with a multiple or ordered cardinality." ; throw new OperatorProcessingException ( $ msg , $ this , OperatorProcessingException :: WRONG_BASETYPE ) ; } $ qtiFuncName = Statistics :: getNameByConstant ( $ this -> getExpression ( ) -> getName ( ) ) ; $ methodName = 'process' . ucfirst ( $ qtiFuncName ) ; return call_user_func_array ( array ( $ this , $ methodName ) , array ( ) ) ; }
Process the StatsOperator.

@return float A single float or NULL if the sub-expression or any value contained therein is NULL.
@throws \qtism\runtime\expressions\operators\OperatorProcessingException
Process the StatsOperator .