/** * Create a new TemplateVariable object. If the cardinality is multiple, ordered or record, * the appropriate container will be instantiated internally as the $value argument. * * @param string $identifier An identifier for the variable. * @param integer $cardinality A value from the Cardinality enumeration. * @param integer $baseType A value from the BaseType enumeration. -1 can be given to state there is no particular baseType if $cardinality is Cardinality::RECORD. * @param int|float|double|boolean|string|Duration|Point|Pair|DirectedPair $value A value which is compliant with the QTI Runtime Model. * @throws \InvalidArgumentException If $identifier is not a string, if $baseType is not a value from the BaseType enumeration, if $cardinality is not a value from the Cardinality enumeration, if $value is not compliant with the QTI Runtime Model. */ public function __construct($identifier, $cardinality, $baseType = -1, $value = null) { parent::__construct($identifier, $cardinality, $baseType, $value); }