public function setComponent(QtiComponent $printedVariable)
    {
        if ($printedVariable instanceof PrintedVariable) {
            parent::setComponent($printedVariable);
        } else {
            $msg = "The PrintedVariableEngine class only accepts PrintedVariable objects to be executed.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setComponent(QtiComponent $printedVariable)
    {
        if ($printedVariable instanceof PrintedVariable) {
            parent::setComponent($printedVariable);
        } else {
            $msg = "The PrintedVariableEngine class only accepts PrintedVariable objects to be executed.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setComponent ( QtiComponent $ printedVariable ) { if ( $ printedVariable instanceof PrintedVariable ) { parent :: setComponent ( $ printedVariable ) ; } else { $ msg = "The PrintedVariableEngine class only accepts PrintedVariable objects to be executed." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the PrintedVariable object to be executed by the engine depending
on the current context.

@param \qtism\data\QtiComponent $printedVariable A PrintedVariable object.
@throws \InvalidArgumentException If $printedVariable is not a PrintedVariable object.
Set the PrintedVariable object to be executed by the engine depending on the current context .