/** * Create a new SimpleAssociableChoice object. * * @param string $identifier The identifier of the choice. * @param integer $matchMax A positive (>= 0) integer. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The lang of the bodyElement. * @param string $label The label of the bodyElement. */ public function __construct($identifier, $matchMax, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setMatchMax($matchMax); $this->setMatchMin(0); $this->setContent(new FlowStaticCollection()); }
/** * Create a new GapChoice object. * * @param string $identifier The identifier of the GapChoice. * @param integer $matchMax The matchMax attribute of the GapChoice. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException */ public function __construct($identifier, $matchMax, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setMatchMax($matchMax); $this->setMatchMin(0); $this->setMatchGroup(new IdentifierCollection()); }
/** * Create a new Gap object. * * @param string $identifier The identifier of the gap. * @param boolean $required Whether or not the Gap is required to be filled to form a valid response. * @param string $id The identifier of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws InvalidArgumentException If one of the constructor's argument is invalid. */ public function __construct($identifier, $required = false, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setRequired($required); }
/** * Create a new HotspotChoice object. * * @param string $identifier The identifier of the choice. * @param integer $shape A value from the Shape enumeration * @param \qtism\common\datatypes\Coords $coords The size and position of the hotspot, interpreted in conjunction with $shape. * @param string $id The identifier of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The lang of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException If one of the argument is invalid. */ public function __construct($identifier, $shape, QtiCoords $coords, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setShape($shape); $this->setCoords($coords); }
/** * Create a new InlineChoice object. * * @param string $identifier The identifier of the InlineChoice. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException If any of the arguments is invalid. */ public function __construct($identifier, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setContent(new TextOrVariableCollection()); }
/** * Create a new AssociableHotspot object. * * @param string $identifier The identifier of the associableHotspot. * @param integer $matchMax The matchMax attribute. * @param integer $shape A value of the Shape enumeration. * @param Coords $coords The coords of the associableHotspot. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgument If one of the constructor's argument is invalid. */ public function __construct($identifier, $matchMax, $shape, Coords $coords, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setMatchMax($matchMax); $this->setShape($shape); $this->setCoords($coords); $this->setMatchGroup(new IdentifierCollection()); }
/** * Create a new Hottext object. * * @param string $identifier The identifier of the choice. * @param string $id The id of the bodyElement * @param string $class The class of the bodyElement. * @param string $lang The lang of the bodyElement. * @param string $label The label of the bodyElement. * @throws InvalidArgumentException If one of the argument is invalid. */ public function __construct($identifier, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); $this->setContent(new InlineStaticCollection()); }
/** * Create a new InlineChoice object. * * @param string $identifier The identifier of the InlineChoice. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws InvalidArgumentException If any of the arguments is invalid. */ public function __construct($identifier, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($identifier, $id, $class, $lang, $label); }