public function setComponent(QtiComponent $rule)
    {
        if ($rule instanceof Rule) {
            parent::setComponent($rule);
        } else {
            $msg = "The RuleEngine class only accepts to execute Rule objects.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setComponent(QtiComponent $rule)
    {
        if ($rule instanceof Rule) {
            parent::setComponent($rule);
        } else {
            $msg = "The RuleEngine class only accepts to execute Rule objects.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setComponent ( QtiComponent $ rule ) { if ( $ rule instanceof Rule ) { parent :: setComponent ( $ rule ) ; } else { $ msg = "The RuleEngine class only accepts to execute Rule objects." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the Rule object to be executed by the engine.

@param \qtism\data\QtiComponent $rule A Rule object to be executed.
@throws \InvalidArgumentException If $rule is not a Rule object.
Set the Rule object to be executed by the engine .