public function __construct(Client $client, array $attributes, array $properties) { parent::__construct($client, $attributes, $properties); /** * Register this subquestion with the parent. */ if (!isset($this->parent)) { throw new \Exception("Parent is required."); } $this->parent->subQuestions[$this->dimension][] = $this; }