public function SetCookie (
		$name, $value,
		$lifetime = 0, $path = '/',
		$domain = NULL, $secure = NULL, $httpOnly = TRUE
	) {
		if ($this->IsSent()) {
			$selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__;
			throw new \RuntimeException(
				"[".$selfClass."] Cannot set cookie after HTTP headers have been sent."
			);
		}
		$request = \MvcCore\Application::GetInstance()->GetRequest();
		return \setcookie(
			$name, $value,
			$lifetime === 0 ? 0 : time() + $lifetime,
			$path,
			$domain === NULL ? $request->GetHostName() : $domain,
			$secure === NULL ? $request->IsSecure() : $secure,
			$httpOnly
		);
	}