/** * Create a new State object. * * @param array $array An optional array of Variable objects. * @throws InvalidArgumentException If an object of $array is not a Variable object. */ public function __construct(array $array = array()) { parent::__construct(); foreach ($array as $a) { $this->checkType($a); $this->setVariable($a); } }
public function offsetUnset($offset) { if (empty($offset)) { parent::offsetUnset($offset); } else { $msg = "QtiComponentCollection must be used as a bag (specific key '{$offset}' given)."; throw new RuntimeException($msg); } }
/** * Create a new Container object. * * @param array $array An array of values to be set in the container. */ public function __construct(array $array = array()) { parent::__construct($array); }