public function withSetting($name, $value) { $copy = clone $this; $copy->settings[$name] = $value; return $copy; }