public function setExpression(Expression $expression) { if ($expression instanceof MapResponse) { parent::setExpression($expression); } else { $msg = "The MapResponseProcessor only accepts MapResponse Expression objects to be processed."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof NullValue) { parent::setExpression($expression); } else { $msg = "The NullProcessor class only processes NullValue QTI Data Model objects."; throw new InvalidArgumentException(); } }
public function setExpression(Expression $expression) { if ($expression instanceof Operator) { parent::setExpression($expression); } else { $msg = "The OperatorProcessor class only accepts QTI Data Model Operators to be processed."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof ItemSubset) { parent::setExpression($expression); } else { $msg = "The ItemSubsetProcessor class only accepts ItemSubset expressions to be processed."; throw new InvalidArgumentException($expression); } }
public function setExpression(Expression $expression) { if ($expression instanceof RandomFloat) { parent::setExpression($expression); } else { $msg = "The RandomFloatProcessor class can only process RandomFloat Expression objects."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof MathConstant) { parent::setExpression($expression); } else { $msg = "The MathConstantProcessor class only processes MathConstant QTI Data Model objects."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof RandomInteger) { parent::setExpression($expression); } else { $msg = "The RandomIntegerProcessor class only accepts to process RandomInteger Expression objects."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof DefaultVal) { parent::setExpression($expression); } else { $msg = "The DefaultProcessor class only accepts a Default Expression to be processed."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof Variable) { parent::setExpression($expression); } else { $msg = "The VariableProcessor class only accepts Variable expressions to be processed."; throw new InvalidArgumentException($expression); } }
public function setExpression(Expression $expression) { if ($expression instanceof Correct) { parent::setExpression($expression); } else { $msg = "The CorrectProcessor can only process Correct Expression objects."; throw new InvalidArgumentException($msg); } }
public function setExpression(Expression $expression) { if ($expression instanceof MapResponsePoint) { parent::setExpression($expression); } else { $msg = "The MapResponsePoint processor can only process MapResponsePoint Expression objects."; throw new InvalidArgumentException($expression); } }
/** * Trace a given Expression $processor execution. * * @param ExpressionProcessor $processor The processor that undertook the processing. * @param mixed $result The result of the processing. */ protected function traceExpression(ExpressionProcessor $processor, $result) { $qtiClassName = $processor->getExpression()->getQtiClassName(); $this->trace("{$qtiClassName} [{$result}]"); }
/** * Create a new OperatorProcessor object. * * @param \qtism\data\expressions\Expression $expression A QTI Data Model Operator object. * @param \qtism\runtime\expressions\operators\OperandsCollection $operands A collection of QTI Runtime compliant values. * @throws \InvalidArgumentException If $expression is not a QTI Data Model Operator object. */ public function __construct(Expression $expression, OperandsCollection $operands) { parent::__construct($expression); $this->setOperands($operands); }