/** * Throws exception * @param array $input */ public function __set($key, $value) { if ($this->immutable) { $this->throwException(); } parent::offsetSet($key, $value); }
/** * Set a service or value in this container based on a provided key * @param string $key * String key to reference the value in the container * @param mixed $value * Mixed value to store in the container */ public function offsetSet($key, $value) { parent::offsetSet($key, $value); $this->keys[$key] = true; }