コード例 #1
0
 /**
  * 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
ファイル: Container.php プロジェクト: nagyist/qti-sdk
 /**
  * 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);
 }