public function setContext(array $context) { if ($this->compiled) { throw new \LogicException('Context cannot be changed after the response is compiled'); } $this->context = $context; }